Showing posts with label mysql backup. Show all posts
Showing posts with label mysql backup. Show all posts

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.