DB Backup to Google Drive
Moderators: leecollings, remb0
-
- Posts: 91
- Joined: Thursday 11 August 2016 12:30
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Location: IT
- Contact:
DB Backup to Google Drive
Hi all,
it's possible to upload automatically the backup of the db of domoticz directly to Google Drive?
Exist a script that do it?
Many thanks.
it's possible to upload automatically the backup of the db of domoticz directly to Google Drive?
Exist a script that do it?
Many thanks.
-
- Posts: 91
- Joined: Thursday 11 August 2016 12:30
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Location: IT
- Contact:
Re: DB Backup to Google Drive
I had seen this post but talk about uploading the backup via ftp. That's not what I need.
-
- Posts: 91
- Joined: Thursday 11 August 2016 12:30
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Location: IT
- Contact:
Re: DB Backup to Google Drive
Sorry, you are talking about rclone, i will see this option.
-
- Posts: 91
- Joined: Thursday 11 August 2016 12:30
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Location: IT
- Contact:
Re: DB Backup to Google Drive
It is very intuitive and quick to apply this script.
Just one thing: the script give me an error of "access denied" when i try to access to db, how did you overcome this problem?
Just one thing: the script give me an error of "access denied" when i try to access to db, how did you overcome this problem?
-
- Posts: 91
- Joined: Thursday 11 August 2016 12:30
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Location: IT
- Contact:
Re: DB Backup to Google Drive
ok with sudo command work very fine!
Thanks a lot.
Thanks a lot.
-
- Posts: 16
- Joined: Saturday 12 August 2017 9:13
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: DB Backup to Google Drive
Hi,
I installed the script and it works out of the box when i use the command to upload the database however it doesn't work when i put it in crontab.
When i copy the line from crontab and execute it manually it works fine but crontab doesn't do anything. Could anyone help me to get it to work ?
My crontab looks like this :
0 1 * * * /home/pi/Dropbox-Uploader/dropbox_uploader.sh upload /home/pi/domoticz/domoticz.db domoticz/domoticz$(date +%d).db >/dev/null 2>&1
edit : Fixed it already
I installed the script and it works out of the box when i use the command to upload the database however it doesn't work when i put it in crontab.
When i copy the line from crontab and execute it manually it works fine but crontab doesn't do anything. Could anyone help me to get it to work ?
My crontab looks like this :
0 1 * * * /home/pi/Dropbox-Uploader/dropbox_uploader.sh upload /home/pi/domoticz/domoticz.db domoticz/domoticz$(date +%d).db >/dev/null 2>&1
edit : Fixed it already
-
- Posts: 91
- Joined: Thursday 11 August 2016 12:30
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Location: IT
- Contact:
Re: DB Backup to Google Drive
How you fixed it? Was a problem if permission?
-
- Posts: 16
- Joined: Saturday 12 August 2017 9:13
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: DB Backup to Google Drive
I don't know what it was, i just made an extra script which i put in crontab that executes this line. I really don't know why crontab won't execute it but now it works ok.
-
- Posts: 91
- Joined: Thursday 11 August 2016 12:30
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Location: IT
- Contact:
Re: DB Backup to Google Drive
Ok i will try because in a raspberry it works fine and the same script in another raspberry doesn't work.
-
- Posts: 80
- Joined: Friday 21 April 2017 8:58
- Target OS: Raspberry Pi / ODroid
- Domoticz version: beta
- Location: Czechia
- Contact:
Re: DB Backup to Google Drive
Hi,
there is specific behaviour of special characters in crontab, like $(date +%d). Look at this:
https://unix.stackexchange.com/question ... on-tab-job
You can store output of "date" command to variable in beginning of crontab, or call another script, as mentioned by @ratjenl and do anything there
there is specific behaviour of special characters in crontab, like $(date +%d). Look at this:
https://unix.stackexchange.com/question ... on-tab-job
You can store output of "date" command to variable in beginning of crontab, or call another script, as mentioned by @ratjenl and do anything there
My toys:
Raspberry Pi 3 + UPS PIco HV3.0 A Stack
Minibian (Raspbian Jessie) + Domoticz beta
RFLink 433 Gateway, 1wire DS18B20 temp sensors (GPIO)
RaZberry module + 2x Comet Z-Wave + Z-wave socket
---
Plugins: WeMo Switch, UPS PIco HV3.0A on GitHub
Raspberry Pi 3 + UPS PIco HV3.0 A Stack
Minibian (Raspbian Jessie) + Domoticz beta
RFLink 433 Gateway, 1wire DS18B20 temp sensors (GPIO)
RaZberry module + 2x Comet Z-Wave + Z-wave socket
---
Plugins: WeMo Switch, UPS PIco HV3.0A on GitHub
-
- Posts: 16
- Joined: Saturday 12 August 2017 9:13
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: DB Backup to Google Drive
Aaaah nice, thnx for the link. I went for the easiest was but it is not the cleanest. I am new to the domoticz world so i chose the easy waymivo wrote: ↑Saturday 12 August 2017 20:58 Hi,
there is specific behaviour of special characters in crontab, like $(date +%d). Look at this:
https://unix.stackexchange.com/question ... on-tab-job
You can store output of "date" command to variable in beginning of crontab, or call another script, as mentioned by @ratjenl and do anything there
Who is online
Users browsing this forum: Google [Bot] and 1 guest