[Koha] How to back up Koha in remort server/machine
Doug Dearden
dearden at sarsf.org
Wed Jul 10 07:07:08 NZST 2013
Hi Upen,
You don't provide a lot of detail, so this is only an example of how you can do it. I am running 3 instances of Koha. I installed from the packages and am running on Debian Squeeze. If you aren't using the package install then you need a script to backup the databases first. The package install includes the database backup.
Script: BACKUPALLDB (copies the database backups from their default location to a working area, then uses tar to pack them into one file)
rm -rf ~/backups/databases/*.*
cp /var/spool/koha/Instance1/*.* ~/backups/databases/
cp /var/spool/koha/Instance2/*.* ~/backups/databases/
cp /var/spool/koha/Instance3/*.* ~/backups/databases/
tar -cf ~/backups/tosend/kohadbs.tar ~/backups/databases/*.gz
Once you have them backed up, then you send them across the lan to the other server you want to back them up on. I use FTP to do this, as we have a FTP server on the lan.
Script: SENDFTP
/usr/bin/ftp -inv ip_address_of_FTP_server > ~/KS/lastrsfr.log<<ENDFTP
user FTPusername FTPpassword
cd /kohabkup
delete kohaprev.tar
rename kohadbs.tar kohaprev.tar
bin
lcd ~/backups/tosend
mput *
bye
ENDFTP
I use cron to schedule these jobs to run every night, the first one runs at 17:00 and the second one at 17:15.
Hope that helps,
Doug
-----Original Message-----
From: koha-bounces at lists.katipo.co.nz [mailto:koha-bounces at lists.katipo.co.nz] On Behalf Of Upendra Tamang
Sent: Tuesday, July 09, 2013 3:53 AM
To: koha at lists.katipo.co.nz
Subject: [Koha] How to back up Koha in remort server/machine
Dear all,
I want to do regular backup of koha server to a remote machine on LAN. I
would be thankful if you could give me the script to do the backup.
I am running koha version 3.0.8 in Debian 6.0.4
Thank you
upen
_______________________________________________
Koha mailing list http://koha-community.org
Koha at lists.katipo.co.nz
http://lists.katipo.co.nz/mailman/listinfo/koha
More information about the Koha
mailing list