Showing posts with label dropbox. Show all posts
Showing posts with label dropbox. Show all posts

Synchronize and store Koha backup in Dropbox

Dropbox 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 the Koha database in pen drive every day.

Install Dropbox client
Create Dropbox account.
Ubuntu users can install the package using the command;

sudo apt-get install nautilus-dropbox

After the installation of the package, open the client from
Applications > Internet > Dropbox
Let it finish the installation.

Sign in the Dropbox account after finishing the installation.

Store Koha database backup in Dropbox

Dropbox is an online storage service. You can configure Dropbox in your PC and put your files direct without visit website. You can make use Dropbox to deposit your Koha backup in online storage. These are the steps I followed:

1. Create an account in Dropbox. Install  Dropbox client in your PC.  https://www.dropbox.com/install?os=lnx Dropbox installation instructions

2.Open Applications > Accessories > Terminal

 Apply the following command,

crontab -e

It will ask to select a text editor. You can select the Nano text editor. Press the Enter button.



You can see crontab file content. Use down arrow button and move the cursor to the bottom part of the cron file. Copy following command there.

30 15 * * * mysqldump -uroot -pmysqlroot koha_library | xz > /home/koha/Dropbox/koha_library.sql.xz


Apply  Ctrl + o button to save the file.

Then apply Ctrl + x to leave the cron.

Koha MySQL backup will deposit in /home/koha/Dropbox folder.
Here 30 15 means timing of creating a database backup. At 3:15 PM a backup of koha database create and put in Dropbox. You can change the timing.  Every day, a new backup create and deposit in Dropbox folder at 3:15 PM automatically. 

Explanations of key parts in the command,

-u root = MySQL root user name

-p mysqlroot = password of MySQL root user.

koha_library = Koha database name

Login to www.dropbox.com to see your database backup.