Daily Backup

47 views
Skip to first unread message

Ronald Merema

unread,
May 19, 2016, 8:19:50 AM5/19/16
to WebSolarLog
Is it possible to make an automatic daily backup to dropbox?

now i have to do it manualy, and there are many days i forget to make one.
It looks to me very important, because i had last month a system crash.

Is there any way to do this? maybe in a cronjob?

Nico Bogaert

unread,
May 22, 2016, 8:20:49 AM5/22/16
to WebSolarLog
I use the dropbox uploader script by Andrea Fabrizi: https://andreafabrizi.it/?dropbox_uploader

It should be fairly straightforward, I think it configures itself first time you run it (can't remember exactly, but I'm not so experienced with Linux and I was able to configure it without any trouble).

I made a small bash script myself that includes this script and that I've put in a daily cronjob. It looks like this:

#!/bin/bash

NOW=$(date +"%Y.%m.%d")

sqlite3 /usr/share/nginx/www/websolarlog/database/wsl.sdb <<EOF
.timeout 20000
.backup /home/pi/wsldbbackup/wsl-$NOW.backup
EOF

$bash /home/pi/dropbox_uploader.sh upload /home/pi/wsldbbackup/wsl-$NOW.backup ./

Hope this helps. 

Nico 

Ronald Merema

unread,
May 29, 2016, 6:40:37 AM5/29/16
to WebSolarLog
Thanks Nico,

I have used your discription,
But i get an error when the script is executed.

Sqlite3 not found.

Is this not standard with WSL?

Nico Bogaert

unread,
May 31, 2016, 4:06:43 PM5/31/16
to WebSolarLog
No idea :) I suppose you are running WSL on a raspberry pi? If so, have you checked if it is installed?

Nico

Martin Diphoorn

unread,
Jun 17, 2016, 11:32:35 AM6/17/16
to webso...@googlegroups.com
Well at the moment it is not possible.

Also there is almost no development at the project. I want to improve stuff, but payed stuff has more priority.

However there is only really one important file and that is the db. So you can backup that in a cron schedule or something.
Reply all
Reply to author
Forward
0 new messages