Different Backups from Crontab to network

All kinds of 'OS' scripts

Moderator: leecollings

Derik
Posts: 1601
Joined: Friday 18 October 2013 23:33
Target OS: Raspberry Pi / ODroid
Domoticz version: BETA
Location: Arnhem/Nijmegen Nederland
Contact:

Different Backups from Crontab to network

Post by Derik »

The search came to nothing .....

I 'm getting deeper into crontab .
And there i found what I'm looking for an automatic backup function .

Have found the document , copy and paste from the wiki I manage just yet . :D
What I would like is that the backup is written to a hdd in the network .
I have 3 RPi with domoticz , it seems to me something to put them , all 3 in1 folder each with its own name . This seems safer , since I still have a power failure , and that the RPi hate , is my experience . :? :?

Can anyone help me. ?
The location of the folder : 192.168.0.11 \ ET9X00 \ Hard Disk \ Domoticz backup
This hdd is always on , but in the sleep function , is that a problem?

If I only :
0 4 *** sudo ~ / domoticz / scripts / domoticz_backup.sh
Use the crontab, put the backup on the sd of the RPI , and my question is.
What should I put in the cron to place the backup to a network location
And what can I change the cron to backup the files as backup1, 2 and 3. [ from the 3 different RPi ]

Thank you . !


Edit ..
Now when I look good, I see the file ~ / domoticz / scripts / domoticz_backup.sh
Not in that folder ?
Do I have to create that file ?
And what have to be in that file?
[solved]
Xu4: Beta Extreme antenna RFXcomE,WU Fi Ping ip P1 Gen5 PVOutput Harmony HUE SolarmanPv OTG Winddelen Alive ESP Buienradar MySensors WOL Winddelen counting RPi: Beta SMAspot RFlinkTest Domoticz ...Different backups
User avatar
Keptenkurk
Posts: 103
Joined: Wednesday 21 August 2013 17:24
Target OS: -
Domoticz version:
Location: Waalre, The Netherlands
Contact:

Re: Different Backups from Crontab to network

Post by Keptenkurk »

Hi Derik,
I see you got the cron example from the Wiki but indeed the domoticz_backup.sh script does not come with the Domoticz installation.
First you need to know which protocol(s) your network disk supports to write to. In my case i choose to use FTP and i suspect most Network drives will support that.
The script is taken from this thread here or this one on the old forum (yes apart from the manual, forum and Wiki there is also an old forum with lots of info).
Leonardo's script lets you choose how to send your backup, by mail, FTP even upload to dropbox is possible. You can take out the things you need for your purpose. I tried to do that and use as much info you gave as possible. Please change your Domoticz IP and FTP username/password and the target directory to your situation!

Code: Select all

#!/bin/bash
# LOCAL/FTP/SCP/MAIL PARAMETERS
SERVER="192.168.0.11"   		# IP of Network disk, used for: ftp mail scp
USERNAME="ftpuser"			# FTP username of Network disk used for: ftp mail scp
PASSWORD="ftppassw"	         	# FTP password of Network disk used for: ftp mail scp
DESTDIR="/opt/backup"		# used for: local
DOMO_IP="192.168.1.199"		# Domoticz IP used for all
DOMO_PORT="8080"			# Domoticz port used for all

### END OF USER CONFIGURABLE PARAMETERS

TIMESTAMP=`/bin/date +%Y%m%d%H%M%S`
BACKUPFILE="domoticz_$TIMESTAMP.db"
BACKUPFILEGZ="$BACKUPFILE".gz

### Create backup and ZIP it
/usr/bin/curl -s http://$DOMO_IP:$DOMO_PORT/backupdatabase.php > /tmp/$BACKUPFILE
gzip -9 /tmp/$BACKUPFILE

### Send to Network disk through FTP
curl -s --disable-epsv -v -T"/tmp/$BACKUPFILEGZ" -u"$USERNAME:$PASSWORD" "ftp://$SERVER/ET9X00/Hard Disk/Domoticz_backup/"

### Remove temp backup file
/bin/rm /tmp/$BACKUPFILEGZ

### Done!

Just save it in the scripts folder as domoticz_backup.sh, make it executable by
sudo chmod 777 /home/pi/domoticz/scripts/domoticz_backup.sh
and try to start it from the commandline in the scripts directory with
./domoticz_backup.sh
and fix the errors :x until your're :P
Then the cron will do it every night at 04:00 for you.
You can run this on each of your PI's
PM me if you need more help...

Meanwhile i have some scripts seen passing by which even backup the whole SD card but i did not yet try that...
/paul
Derik
Posts: 1601
Joined: Friday 18 October 2013 23:33
Target OS: Raspberry Pi / ODroid
Domoticz version: BETA
Location: Arnhem/Nijmegen Nederland
Contact:

Re: Different Backups from Crontab to network

Post by Derik »

Code: Select all

root@raspberrypi:~# cd home/pi/domoticz/scripts
-bash: cd: home/pi/domoticz/scripts: Bestand of map bestaat niet
root@raspberrypi:~# cd /home/pi/domoticz/scripts
root@raspberrypi:/home/pi/domoticz/scripts# ./domoticz_backup.sh
./domoticz_backup.sh: regel 9: $'\r': opdracht niet gevonden
./domoticz_backup.sh: regel 11: $'\r': opdracht niet gevonden
./domoticz_backup.sh: regel 15: $'\r': opdracht niet gevonden
./domoticz_backup.sh: regel 19: $'\r': opdracht niet gevonden
'!zl: Can't open '/tmp/domoticz_20131116190802
curl: try 'curl --help' or 'curl --manual' for more information
./domoticz_backup.sh: regel 22: $'\r': opdracht niet gevonden
/bin/rm: kan '/tmp/domoticz_20131116190802\r.db\r.gz\r\r' niet verwijderen: Bestand of map bestaat niet
./domoticz_backup.sh: regel 25: $'\r': opdracht niet gevonden
root@raspberrypi:/home/pi/domoticz/scripts#

Second try

Code: Select all

root@raspberrypi:/home/pi/domoticz/scripts# ./domoticz_backup.sh
* About to connect() to 192.168.0.10 port 21 (#0)
*   Trying 192.168.0.10...
* connected
* Connected to 192.168.0.10 (192.168.0.10) port 21 (#0)
* FTP 0x10acff8 state change from STOP to WAIT220
< 220 Welcome to the openpli FTP service!
> USER ftpuser
* FTP 0x10acff8 state change from WAIT220 to USER
< 331 Please specify the password.
> PASS ftppassw
* FTP 0x10acff8 state change from USER to PASS
< 530 Login incorrect.
* Access denied: 530
* Closing connection #0
root@raspberrypi:/home/pi/domoticz/scripts#
Third time:

Code: Select all

root@raspberrypi:/home/pi/domoticz/scripts# ./domoticz_backup.sh
* About to connect() to 192.168.0.10 port 21 (#0)
*   Trying 192.168.0.10...
* connected
* Connected to 192.168.0.10 (192.168.0.10) port 21 (#0)
* FTP 0x652ff0 state change from STOP to WAIT220
< 220 Welcome to the openpli FTP service!
> USER root
* FTP 0x652ff0 state change from WAIT220 to USER
< 331 Please specify the password.
> PASS root
* FTP 0x652ff0 state change from USER to PASS
< 230 Login successful.
> PWD
* FTP 0x652ff0 state change from PASS to PWD
< 257 "/"
* Entry path is '/'
* FTP 0x652ff0 state change from PWD to STOP
* protocol connect phase DONE
* DO phase starts
> CWD ET9X00
* FTP 0x652ff0 state change from STOP to CWD
< 550 Failed to change directory.
* Server denied you to change to the given directory
* DO phase is complete
* Uploaded unaligned file size (0 out of 41287 bytes)
* Connection #0 to host 192.168.0.10 left intact
> QUIT
* FTP 0x652ff0 state change from CWD to QUIT
< 221 Goodbye.
* FTP 0x652ff0 state change from QUIT to STOP
* Closing connection #0
root@raspberrypi:/home/pi/domoticz/scripts# r
Blank password:

Code: Select all

root@raspberrypi:/home/pi/domoticz/scripts# ^C
root@raspberrypi:/home/pi/domoticz/scripts# ./domoticz_backup.sh

* About to connect() to 192.168.0.10 port 21 (#0)
*   Trying 192.168.0.10...
* connected
* Connected to 192.168.0.10 (192.168.0.10) port 21 (#0)
* FTP 0x1fbdff0 state change from STOP to WAIT220
< 220 Welcome to the openpli FTP service!
> USER
* FTP 0x1fbdff0 state change from WAIT220 to USER
< 331 Please specify the password.
> PASS
* FTP 0x1fbdff0 state change from USER to PASS
< 503 Login with USER first.
* Access denied: 503
* Closing connection #0
root@raspberrypi:/home/pi/domoticz/scripts#
It seems there already?
Blank lines removed?
Password, but that is not really in?
Is there a way that I can do a test

The file system is ext3 HHD, maybe some of you out there?

Actually there is no hdd password and user.
Only when i left the field blank in the. Sh he asks for a use

thanks
Xu4: Beta Extreme antenna RFXcomE,WU Fi Ping ip P1 Gen5 PVOutput Harmony HUE SolarmanPv OTG Winddelen Alive ESP Buienradar MySensors WOL Winddelen counting RPi: Beta SMAspot RFlinkTest Domoticz ...Different backups
User avatar
Keptenkurk
Posts: 103
Joined: Wednesday 21 August 2013 17:24
Target OS: -
Domoticz version:
Location: Waalre, The Netherlands
Contact:

Re: Different Backups from Crontab to network

Post by Keptenkurk »

Derik,
You're progressing! Still a bit :x but close to :P
The trird try came closest! I'll explain what the feedback is.

* About to connect() to 192.168.0.10 port 21 (#0)
* Trying 192.168.0.10...
* connected
* Connected to 192.168.0.10 (192.168.0.10) port 21 (#0)
* FTP 0x652ff0 state change from STOP to WAIT220
-----> Great! Your Networked disk supports FTP

< 220 Welcome to the openpli FTP service!
> USER root
* FTP 0x652ff0 state change from WAIT220 to USER
< 331 Please specify the password.
> PASS root
* FTP 0x652ff0 state change from USER to PASS
< 230 Login successful.
-----> And the script manages to login! Keep this username & password in your script


> PWD
* FTP 0x652ff0 state change from PASS to PWD
< 257 "/"
* Entry path is '/'
* FTP 0x652ff0 state change from PWD to STOP
* protocol connect phase DONE
* DO phase starts
-----> PWD stands for Print Working Directory. i.e. In what directory are we currently? The answer is: / the root.

> CWD ET9X00
* FTP 0x652ff0 state change from STOP to CWD
< 550 Failed to change directory.
* Server denied you to change to the given directory
-----> CWD means Change Working Directory to ET9X00, but this fails probably because it doesn't exist!

* DO phase is complete
* Uploaded unaligned file size (0 out of 41287 bytes)
* Connection #0 to host 192.168.0.10 left intact
> QUIT
* FTP 0x652ff0 state change from CWD to QUIT
< 221 Goodbye.
* FTP 0x652ff0 state change from QUIT to STOP
* Closing connection #0
-----> no more to do, so quit.

Now in your previous post you mention the target folder is 192.168.0.11 \ ET9X00 \ Hard Disk \ Domoticz backup
Appearantly ET9X00 is the device? If so you mean that the folder "Domoticz backup" is in the root?
Having spaces is a bad idea so change it to Domoticz_backup and assuming it is in the root like /Domoticz_backup change the script to:
curl -s --disable-epsv -v -T"/tmp/$BACKUPFILEGZ" -u"$USERNAME:$PASSWORD" "ftp://$SERVER/Domoticz_backup/"

Watch the script output if the CWD works out and the backup file is transferred.
/paul
Derik
Posts: 1601
Joined: Friday 18 October 2013 23:33
Target OS: Raspberry Pi / ODroid
Domoticz version: BETA
Location: Arnhem/Nijmegen Nederland
Contact:

Re: Different Backups from Crontab to network

Post by Derik »

Ai ...
The proposals that you gave nie help at all.
But is he really be in the root?

I modified it now, it looks like I should go ...? Through PLi
But also seems not well ...
Firts change, all space gone

Code: Select all

root@raspberrypi:/home/pi/domoticz/scripts# ./domoticz_backup.sh
* About to connect() to 192.168.0.10 port 21 (#0)
*   Trying 192.168.0.10...
* connected
* Connected to 192.168.0.10 (192.168.0.10) port 21 (#0)
* FTP 0x4a7ff0 state change from STOP to WAIT220
< 220 Welcome to the openpli FTP service!
> USER root
* FTP 0x4a7ff0 state change from WAIT220 to USER
< 331 Please specify the password.
> PASS root
* FTP 0x4a7ff0 state change from USER to PASS
< 230 Login successful.
> PWD
* FTP 0x4a7ff0 state change from PASS to PWD
< 257 "/"
* Entry path is '/'
* FTP 0x4a7ff0 state change from PWD to STOP
* protocol connect phase DONE
* DO phase starts
> CWD ET9X00
* FTP 0x4a7ff0 state change from STOP to CWD
< 550 Failed to change directory.
* Server denied you to change to the given directory
* DO phase is complete
* Uploaded unaligned file size (0 out of 43930 bytes)
* Connection #0 to host 192.168.0.10 left intact
> QUIT
* FTP 0x4a7ff0 state change from CWD to QUIT
< 221 Goodbye.
* FTP 0x4a7ff0 state change from QUIT to STOP
* Closing connection #0
Second try it from the root of PLi

Code: Select all

root@raspberrypi:/home/pi/domoticz/scripts# ./domoticz_backup.sh
* About to connect() to 192.168.0.10 port 21 (#0)
*   Trying 192.168.0.10...
* connected
* Connected to 192.168.0.10 (192.168.0.10) port 21 (#0)
* FTP 0xa7bfd0 state change from STOP to WAIT220
< 220 Welcome to the openpli FTP service!
> USER root
* FTP 0xa7bfd0 state change from WAIT220 to USER
< 331 Please specify the password.
> PASS root
* FTP 0xa7bfd0 state change from USER to PASS
< 230 Login successful.
> PWD
* FTP 0xa7bfd0 state change from PASS to PWD
< 257 "/"
* Entry path is '/'
* FTP 0xa7bfd0 state change from PWD to STOP
* protocol connect phase DONE
* DO phase starts
> CWD ET9X00
* FTP 0xa7bfd0 state change from STOP to CWD
< 550 Failed to change directory.
* Server denied you to change to the given directory
* DO phase is complete
* Uploaded unaligned file size (0 out of 44006 bytes)
* Connection #0 to host 192.168.0.10 left intact
> QUIT
* FTP 0xa7bfd0 state change from CWD to QUIT
< 221 Goodbye.
* FTP 0xa7bfd0 state change from QUIT to STOP
* Closing connection #0
Attachments
ScreenShot064.jpg
ScreenShot064.jpg (11.44 KiB) Viewed 14955 times
ScreenShot062.jpg
ScreenShot062.jpg (38.25 KiB) Viewed 14955 times
ScreenShot063.jpg
ScreenShot063.jpg (20.66 KiB) Viewed 14955 times
Xu4: Beta Extreme antenna RFXcomE,WU Fi Ping ip P1 Gen5 PVOutput Harmony HUE SolarmanPv OTG Winddelen Alive ESP Buienradar MySensors WOL Winddelen counting RPi: Beta SMAspot RFlinkTest Domoticz ...Different backups
asjmcguire
Posts: 71
Joined: Saturday 13 July 2013 2:45
Target OS: Linux
Domoticz version: 3.5877
Location: Scotland
Contact:

Re: Different Backups from Crontab to network

Post by asjmcguire »

CWD ET9X00
* FTP 0x4a7ff0 state change from STOP to CWD
< 550 Failed to change directory.
* Server denied you to change to the given directory

Means the directory doesn't exist - and it doesn't you have shown that - ET9X00 is the name of the device - not the name of a directory.
Your first step is to use a program like Filezilla available free from many download sites, ftp onto your NAS from filezilla using the same credentials as the script uses to "see" what folders are in actually in the initial path "/" It is likely that the ftp daemon running on the NAS dumps you inside the Windows share called "Harddisk" - however it may be dumping you in the share called "Root".

Figure out what folders are visible via ftp and then adjust the script accordingly.

Just for info - it is likely that this line:

Code: Select all

curl -s --disable-epsv -v -T"/tmp/$BACKUPFILEGZ" -u"$USERNAME:$PASSWORD" "ftp://$SERVER/ET9X00/Hard Disk/Domoticz_backup/"
will become something more like

Code: Select all

curl -s --disable-epsv -v -T"/tmp/$BACKUPFILEGZ" -u"$USERNAME:$PASSWORD" "ftp://$SERVER/Domoticz_backup/"
AEOTEC ZStick, 11 ZWave Nodes, RFXCOMM, 50ish Byron Sockets.. HE851 (PIR), 2x HE852 (DoorContact)
WS2300, CM180, CC128, 2xTHGR122NX, 2xPiZeroW w/DS18B20, 8Ch 1W Relay Board.
8 Panasonic IP Cams, 1 16ch CCTV DVR + 15 CCTV Cams
antwan
Posts: 116
Joined: Saturday 13 July 2013 13:28
Target OS: Linux
Domoticz version: Latest
Location: Hilversum, The Netherlands
Contact:

Re: Different Backups from Crontab to network

Post by antwan »

The device is not a Nas, but a Linux stb (extrend et-9000).
Rasp Pi 2B: 3x DS18S20 (1-wire), BME280 (i2c)
Cubietruck 1: Aeotec Z-Wave+, RFXtrx433XL+P1, RFXtrx868, TE923 display, SolarEdge API
Cubietruck 2: Aeotec Z-Wave, Voltcraft CO-20
Derik
Posts: 1601
Joined: Friday 18 October 2013 23:33
Target OS: Raspberry Pi / ODroid
Domoticz version: BETA
Location: Arnhem/Nijmegen Nederland
Contact:

Re: Different Backups from Crontab to network

Post by Derik »

And it's true it's a satellite box, with Open PLi.
How beautiful zoi it be if these two could work together. ;) ;)

I have somethings changed.... [ looks better ] :D :D

Code: Select all

root@raspberrypi:/home/pi/domoticz/scripts# ./domoticz_backup.sh                                                                                                                  * About to connect() to 192.168.0.10 port 21 (#0)
*   Trying 192.168.0.10...
* connected
* Connected to 192.168.0.10 (192.168.0.10) port 21 (#0)
* FTP 0x3aff58 state change from STOP to WAIT220
< 220 Welcome to the openpli FTP service!
> USER root
* FTP 0x3aff58 state change from WAIT220 to USER
< 331 Please specify the password.
> PASS root
* FTP 0x3aff58 state change from USER to PASS
< 230 Login successful.
> PWD
* FTP 0x3aff58 state change from PASS to PWD
< 257 "/"
* Entry path is '/'
* FTP 0x3aff58 state change from PWD to STOP
* protocol connect phase DONE
* DO phase starts
> CWD media
* FTP 0x3aff58 state change from STOP to CWD
< 250 Directory successfully changed.
> CWD hdd
< 250 Directory successfully changed.
> PASV
* FTP 0x3aff58 state change from CWD to PASV
* Connect data stream passively
< 227 Entering Passive Mode (192,168,0,10,219,70).
*   Trying 192.168.0.10...
* connected
* Connecting to 192.168.0.10 (192.168.0.10) port 56134
* FTP 0x3aff58 state change from PASV to STOP
* DO phase is complete
> TYPE I
* FTP 0x3aff58 state change from STOP to STOR_TYPE
< 200 Switching to Binary mode.
> STOR Domoticz_backup
* FTP 0x3aff58 state change from STOR_TYPE to STOR
< 553 Could not create file.
* Failed FTP upload: 553
* DO-MORE phase ends with 25
* Remembering we are in dir "media/hdd/"
* Uploaded unaligned file size (0 out of 44080 bytes)
* Connection #0 to host 192.168.0.10 left intact
> QUIT
* FTP 0x3aff58 state change from STOR to QUIT
< 221 Goodbye.
* FTP 0x3aff58 state change from QUIT to STOP
* Closing connection #0
root@raspberrypi:/home/pi/domoticz/scripts#
This one is the problem i gues?? = < 553 Could not create file.
And this one is very strange: * Remembering we are in dir "media/hdd/"
Because: curl -s --disable-epsv -v -T"/tmp/$BACKUPFILEGZ" -u"$USERNAME:$PASSWORD" "ftp://$SERVER/media/hdd/Domoticz_backup"



What is the file what should come to be?
I would first have to put down first ...
ScreenShot067.jpg
ScreenShot067.jpg (76.47 KiB) Viewed 14953 times
ScreenShot066.jpg
ScreenShot066.jpg (21.13 KiB) Viewed 14953 times
ScreenShot065.jpg
ScreenShot065.jpg (24.3 KiB) Viewed 14953 times
Xu4: Beta Extreme antenna RFXcomE,WU Fi Ping ip P1 Gen5 PVOutput Harmony HUE SolarmanPv OTG Winddelen Alive ESP Buienradar MySensors WOL Winddelen counting RPi: Beta SMAspot RFlinkTest Domoticz ...Different backups
User avatar
Keptenkurk
Posts: 103
Joined: Wednesday 21 August 2013 17:24
Target OS: -
Domoticz version:
Location: Waalre, The Netherlands
Contact:

Re: Different Backups from Crontab to network

Post by Keptenkurk »

Derik,
You're just a "/" away from :P '

Change
curl -s --disable-epsv -v -T"/tmp/$BACKUPFILEGZ" -u"$USERNAME:$PASSWORD" "ftp://$SERVER/media/hdd/Domoticz_backup"
into
curl -s --disable-epsv -v -T"/tmp/$BACKUPFILEGZ" -u"$USERNAME:$PASSWORD" "ftp://$SERVER/media/hdd/Domoticz_backup/"

Thanks for adding the info, that sure helps helping.
/Paul
Derik
Posts: 1601
Joined: Friday 18 October 2013 23:33
Target OS: Raspberry Pi / ODroid
Domoticz version: BETA
Location: Arnhem/Nijmegen Nederland
Contact:

Re: Different Backups from Crontab to network

Post by Derik »

GREAT!!!!!

THANKS!!

You can hear him turn on the HDD, please wait and he finished! Says
No nas device, and still a nightly backup.
Bizarre!
ScreenShot068.jpg
ScreenShot068.jpg (23.47 KiB) Viewed 14946 times
But, now comes the dummy question again.
I now see a xxxxx.DB.GZ file.
While I had expected. Only. Db
What should I do with this file as a backup to put back?

edit:
And how can I automatically give different names to the different backups

Edit2:
dummy dumb ..
gz is a zip so unzip.
Name change to domticz.db
And then restore that I manage certain

Remains the last over.

3x domoticz, xxxx.backup xxxxx.backup 1 and 2 and 3 xxxx.backup
That's what I love to see in the folder on hdd
Xu4: Beta Extreme antenna RFXcomE,WU Fi Ping ip P1 Gen5 PVOutput Harmony HUE SolarmanPv OTG Winddelen Alive ESP Buienradar MySensors WOL Winddelen counting RPi: Beta SMAspot RFlinkTest Domoticz ...Different backups
User avatar
Keptenkurk
Posts: 103
Joined: Wednesday 21 August 2013 17:24
Target OS: -
Domoticz version:
Location: Waalre, The Netherlands
Contact:

Re: Different Backups from Crontab to network

Post by Keptenkurk »

Derek,
Great to see it works.
The database is archived (zipped). For instance WinRAR is able to unzip, but there are more tools out there. This will give you a file like Domotiz_20131117110117.db.
In case disaster strikes rename it to domoticz.db, stop domoticz, overwrite the database (all info in contained in domoticz.db) and start domoticz again.

Maybe the easiest way to have multiple backups is by creating a separate folder for each one of them on the STB and have the script write in their "own" folder...
/paul
Derik
Posts: 1601
Joined: Friday 18 October 2013 23:33
Target OS: Raspberry Pi / ODroid
Domoticz version: BETA
Location: Arnhem/Nijmegen Nederland
Contact:

Re: Different Backups from Crontab to network

Post by Derik »

I feel good!!

It works ... :D :D :mrgreen: :mrgreen: :mrgreen:
Domoticz 3 per backup ...
ScreenShot069.jpg
ScreenShot069.jpg (11.74 KiB) Viewed 14914 times
I'm a pro at the be ..
Now wait if he does his work tonight ..
Every backup but just give another time, otherwise the pressure on the hdd.

And then there should be a lock on this topic... :D :D :roll: .

Or if there are more people with questions, I can help, mwhaaaa [who would have expected] ;) ;)

Thanks!!
Attachments
ScreenShot070.jpg
ScreenShot070.jpg (49.57 KiB) Viewed 14914 times
Xu4: Beta Extreme antenna RFXcomE,WU Fi Ping ip P1 Gen5 PVOutput Harmony HUE SolarmanPv OTG Winddelen Alive ESP Buienradar MySensors WOL Winddelen counting RPi: Beta SMAspot RFlinkTest Domoticz ...Different backups
User avatar
Keptenkurk
Posts: 103
Joined: Wednesday 21 August 2013 17:24
Target OS: -
Domoticz version:
Location: Waalre, The Netherlands
Contact:

Re: Different Backups from Crontab to network

Post by Keptenkurk »

Haha you make my day!
Derik
Posts: 1601
Joined: Friday 18 October 2013 23:33
Target OS: Raspberry Pi / ODroid
Domoticz version: BETA
Location: Arnhem/Nijmegen Nederland
Contact:

Re: Different Backups from Crontab to network

Post by Derik »

Keptenkurk wrote:Haha you make my day!
No you did...

xxxx
Xu4: Beta Extreme antenna RFXcomE,WU Fi Ping ip P1 Gen5 PVOutput Harmony HUE SolarmanPv OTG Winddelen Alive ESP Buienradar MySensors WOL Winddelen counting RPi: Beta SMAspot RFlinkTest Domoticz ...Different backups
Derik
Posts: 1601
Joined: Friday 18 October 2013 23:33
Target OS: Raspberry Pi / ODroid
Domoticz version: BETA
Location: Arnhem/Nijmegen Nederland
Contact:

Re: Different Backups from Crontab to network

Post by Derik »

And watch...
ScreenShot077.jpg
ScreenShot077.jpg (19.79 KiB) Viewed 14881 times
Xu4: Beta Extreme antenna RFXcomE,WU Fi Ping ip P1 Gen5 PVOutput Harmony HUE SolarmanPv OTG Winddelen Alive ESP Buienradar MySensors WOL Winddelen counting RPi: Beta SMAspot RFlinkTest Domoticz ...Different backups
Derik
Posts: 1601
Joined: Friday 18 October 2013 23:33
Target OS: Raspberry Pi / ODroid
Domoticz version: BETA
Location: Arnhem/Nijmegen Nederland
Contact:

Re: Different Backups from Crontab to network

Post by Derik »

I have a problem ....
Sind I tried the crontab to fine tune. [ make crontab on a other hour. ]

I do not get it together to get the backup. Working
've Tried several.
Even all the steps done over again.

Should I make the crontab as root or pi?


The command i used:
sudo chmod 777 /home/pi/domoticz/scripts/domoticz_backup.sh

This is working ine:
cd /home/pi/domoticz/scripts
./domoticz_backup.sh


Where would could i go wrong?


I was so proud .... :( :( :(
Attachments
ScreenShot085.jpg
ScreenShot085.jpg (70.61 KiB) Viewed 14846 times
ScreenShot084.jpg
ScreenShot084.jpg (26.75 KiB) Viewed 14846 times
ScreenShot083.jpg
ScreenShot083.jpg (29.63 KiB) Viewed 14846 times
Xu4: Beta Extreme antenna RFXcomE,WU Fi Ping ip P1 Gen5 PVOutput Harmony HUE SolarmanPv OTG Winddelen Alive ESP Buienradar MySensors WOL Winddelen counting RPi: Beta SMAspot RFlinkTest Domoticz ...Different backups
User avatar
Keptenkurk
Posts: 103
Joined: Wednesday 21 August 2013 17:24
Target OS: -
Domoticz version:
Location: Waalre, The Netherlands
Contact:

Re: Different Backups from Crontab to network

Post by Keptenkurk »

Well... since it *did* work the problem should be in the crontab... what does the file look like after your change. Did you only change the number 4 ?
/paul
Paulyoh
Posts: 5
Joined: Sunday 22 September 2013 22:21
Target OS: Raspberry Pi / ODroid
Domoticz version: 2023.1
Location: Malmö, SWEDEN
Contact:

Different Backups from Crontab to network

Post by Paulyoh »

Will this URL help?
How to configure crontab:
http://v1.corenominal.org/howto-setup-a-crontab-file/
Derik
Posts: 1601
Joined: Friday 18 October 2013 23:33
Target OS: Raspberry Pi / ODroid
Domoticz version: BETA
Location: Arnhem/Nijmegen Nederland
Contact:

Re: Different Backups from Crontab to network

Post by Derik »

Thanks..
pfff.

It should all be correct though in linux:

0 4 * * * sudo ~ /domoticz/scripts/domoticz_backup.sh

Should be:

0 4 * * * sudo ~/domoticz/scripts/domoticz_backup.sh

So a space after ~ he hates ..

Mierenneukers .... :D :D :D

But yeah learned a lot ...
pay attention

And I know right away that copy and paste causes a problem ..
Xu4: Beta Extreme antenna RFXcomE,WU Fi Ping ip P1 Gen5 PVOutput Harmony HUE SolarmanPv OTG Winddelen Alive ESP Buienradar MySensors WOL Winddelen counting RPi: Beta SMAspot RFlinkTest Domoticz ...Different backups
Derik
Posts: 1601
Joined: Friday 18 October 2013 23:33
Target OS: Raspberry Pi / ODroid
Domoticz version: BETA
Location: Arnhem/Nijmegen Nederland
Contact:

Re: Different Backups from Crontab to network

Post by Derik »

proud ... :D

I wish they would have ....

Thanks :mrgreen:
ScreenShot086.jpg
ScreenShot086.jpg (38.61 KiB) Viewed 14802 times
Xu4: Beta Extreme antenna RFXcomE,WU Fi Ping ip P1 Gen5 PVOutput Harmony HUE SolarmanPv OTG Winddelen Alive ESP Buienradar MySensors WOL Winddelen counting RPi: Beta SMAspot RFlinkTest Domoticz ...Different backups
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests