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.

8 comments:

  1. Hi thanks for your very informative post. I am however having problems running it as a cronjob. Though its is working well when i run it in the terminal, its is not depositing daily backups as expected and when i run it in webmin i get the following error "/bin/sh: 1: /backup.sh: not found". What do you think is the problem?

    ReplyDelete
  2. As i know how to connect database and create database in koha live dvd...
    please reply to my above mailid thangabalu@yahoo.co.in

    ReplyDelete
  3. Should there be another persuasive post you can share next time, I’ll be surely waiting for it. vaultscape

    ReplyDelete
  4. Dear Sir
    Good afternoon kindly tell me if my software is corput where is past the backup .
    Kindly guide me.


    Lalit Thakur
    lalit_thakur2007@yahoo.com

    ReplyDelete
    Replies
    1. Loging to dropbox.com
      Where your database backup reside.

      Delete
  5. Respected sir
    Gud afternoon and at first thanks and how can generate library card in koha kindly guide me.

    ReplyDelete
    Replies
    1. What type of card you mean?
      Patron ID card?
      http://manual.koha-community.org/3.12/en/tools.html#patroncardcreator

      Delete
  6. Sir
    Good afternoon and at first thanks and what is the process of excel to koha import the file kindly guide me.

    thanks

    ReplyDelete