Drobox is an online storage service and it offers 2 GB free storage space. "Dropbox allows users to create a special folder on their computers, which Dropbox then synchronizes so that it appears to be the same folder (with the same contents) regardless of which device is used to view it. Files placed in this folder are also accessible via the Dropbox website and mobile apps". It is very convenient to store Koha database backup in Dropbox cloud storage. No need to copy Koha data base in pen drive everyday.
Install Dropbox client
Create Dropbox account. Download Dropbox client application from here. Ubuntu users can install the package using the command;
sudo dpkg -i dropbox*.deb
After the installation of the package, open the client from Applications > Internet > Dropbox
Sign in the Dropbox account after finishing the installation.
Dropbox will create a folder "Dropbox" in Linux user home. Where we have to point Koha backup destination. Files deposited in Dropbox folder also save in cloud storage.
Dropbox will create a folder "Dropbox" in Linux user home. Where we have to point Koha backup destination. Files deposited in Dropbox folder also save in cloud storage.
Automatic Koha backup
Here we are going to schedule Koha backup in every 60 minutes the help of cronjob.
Apply the following command,
crontab -e
It will ask to select a text editor. You can select Nano text editor.
Use down arrow button and move the cursor to bottom part of the cron file. Copy following command there.
*/60 * * * * mysqldump -uroot -pmysqlroot koha_library | gzip -9 > /home/koha/Dropbox/koha_library.sql.gz
Change MySQL password and the destination folder location.
Apply Ctrl + o button to save the file.
Then apply Ctrl + x to leave the cron.
You can find backup file in /home/koha/Dropbox folder after 60 minutes.
After 60 minutes login to dropbox.com to check backup moved to online storage.
Explanations of key parts in the command,
*/60 = Every 60 minute take a backup.User can change the frequency.
-uroot = MySQL root user name
-pmysqlroot = password of MySQL root user.
koha_library = Koha database name