الجمعة، 4 يناير 2013

How to use Dropbox for backup Koha database

Dropbox is an online storage service. You can configure Dropbox with 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. Create a shell script. Open a terminal and type following;
sudo su
gedit backup.sh 
Add the following lines;
#!/bin/sh
mysqldump --single-transaction -u root -pmysqlroot koha > /home/koha/koha.sql
gzip -f /home/koha/koha.sql
mv koha.sql.gz /home/kohs/Dropbox
Save the file and close the file.

3. Make change in Crontab

Open a new Terminal and type  
export EDITOR=gedit
crontab -e
Add the following entries at the bottom of the  cronjob.
#Backup
30 15 * * * /home/koha/backup.sh
Save the file and close.

Here 30 15 means timing of create database backup. At 3:15 PM a backup of koha database create and put in Dropbox. You can change the timing.  Everyday, a new backup create and deposit in Dropbox folder at 3:15 PM automatically. 

ليست هناك تعليقات:

إرسال تعليق