Hi, How do I make backups of koha's mysql database? Specifically, what files do I need to make backups of? -- Jim Thomas Principal Applications Engineer Bittware, Inc jthomas@bittware.com http://www.bittware.com (703) 779-7770 Things could be a lot better around here, but worse is more likely - Calvin
On Thu, 21 Nov 2002, Jim Thomas wrote:
How do I make backups of koha's mysql database? Specifically, what files do I need to make backups of?
In my installation the Koha database files are located in /var/lib/mysql/Koha/ Back up everything in that location. There will be files named biblio.*, biblioitems.*, items.*, issues.*, reserves.*, etc. Steve.
On Thu, Nov 21, 2002 at 11:58:44AM -0800, Tonnesen Steve said:
On Thu, 21 Nov 2002, Jim Thomas wrote:
How do I make backups of koha's mysql database? Specifically, what files do I need to make backups of?
In my installation the Koha database files are located in
/var/lib/mysql/Koha/
Back up everything in that location. There will be files named biblio.*, biblioitems.*, items.*, issues.*, reserves.*, etc.
Another way to do a back up is by using mysqldump mysqldump -uusername -ppassword --add-drop-table Koha > kohabackup.mysql I run nightly ones of these and then gzip them up. What we also do for HLT is run mysql replication, so we have a master-slave relationship set up, so we are doing real time offsite backups. All the tables are important, but in general the issues table is the most important (this records all items out on issue). And is the table that would be hardest to recreate if it was ever lost. Hope this is helpful Chris -- Chris Cormack Programmer 025 500 789 Katipo Communications Ltd chris@katipo.co.nz www.katipo.co.nz
Chris Cormack a écrit:
On Thu, Nov 21, 2002 at 11:58:44AM -0800, Tonnesen Steve said:
On Thu, 21 Nov 2002, Jim Thomas wrote:
How do I make backups of koha's mysql database? Specifically, what files do I need to make backups of?
In my installation the Koha database files are located in /var/lib/mysql/Koha/ Back up everything in that location. There will be files named biblio.*, biblioitems.*, items.*, issues.*, reserves.*, etc.
Another way to do a back up is by using mysqldump
mysqldump -uusername -ppassword --add-drop-table Koha > kohabackup.mysql
I run nightly ones of these and then gzip them up. What we also do for HLT is run mysql replication, so we have a master-slave relationship set up, so we are doing real time offsite backups.
It is STRONGLY NOT RECOMMENDED NOT to do what steve suggest, but to use mysqldump instead. With new versions of mySQL, (or any other db), you've absolutely NOT WARRANTY that the tables in file system contains the "uptodate" data. With transactions coming in 4.x series of mySQL, you're almost sure that 1 backup on 2 will be unuseable. However, mysqldump IS the tool you must use. Take a look at misc/backup.sh in koha -- Paul
I've used the below cron script to backup koha's databases. This script run everynight and backup a sperate file for each day's database. Backup file named koha + year + mount + day, for example koha20021101, koha20021102, koha20021103 and so on. This script also send the backup file to another machine with ftp. to run this script every day put it /etc/cron.d directory. _______________ beginnign of file _____________________ #!/bin/sh # # koha's back-up cron script # mysqldump -uroot -pyonca --add-drop-table koha
/home/yedek/koha/koha`date +%y%m%d` ncftpput -V -u celikbas -p sem3zak 160.75.14.95 koha /home/yedek/koha/koha`date +%y%m%d` _______________ the end of file _____________________
On 21 Nov 2002 at 14:11, Jim Thomas wrote:
Hi,
How do I make backups of koha's mysql database? Specifically, what files do I need to make backups of?
-- Jim Thomas Principal Applications Engineer Bittware, Inc jthomas@bittware.com http://www.bittware.com (703) 779-7770 Things could be a lot better around here, but worse is more likely - Calvin _______________________________________________ Koha mailing list Koha@lists.katipo.co.nz http://lists.katipo.co.nz/mailman/listinfo/koha
Zeki Celikbas
On Thu, 21 Nov 2002, Jim Thomas wrote:
How do I make backups of koha's mysql database? Specifically, what files do I need to make backups of?
What I see is that my Koha datadir is: /usr/local/mysql/data/Koha I would backup the entire mysql database. Now that would have to be done on the mysql server, not on the Koha client machine. Does this make sense? If not I'll try to explain further. Jessica -- Jessica Rasku http://www.armispiansystems.ca/jrasku/ Armispian Systems http://www.armispiansystems.ca/
participants (6)
-
Chris Cormack -
Jessica Rasku -
Jim Thomas -
paul POULAIN -
Tonnesen Steve -
Zeki Celikbas