Hello all, I want to check to make sure I am backing up Koha correctly. I looked at this reference: http://www.kohadocs.org/Backups_and_Restoring.html It refers to the file structure for an earlier version. I couldn't find anything in the doc at https://sites.google.com/a/liblime.com/koha-manual/ , but maybe I am missing something there. Here is what I came up with: Backup the database using: mysqldump --add-drop-table -u<dbusername> -p<dbpassword> koha > koha.sql I am running multiple databases, and am repeating the above for each unique database name. Backup all of the files in /usr/share/koha . Backup the extra config files in: /etc/koha /etc/apache2 /etc/mysql/my.cnf I am also backing up these as I made changes to them - perhaps unique to my install: /etc/vsftpd.conf /etc/network /etc/hosts I am using cron to run several scripts that do the above, using tar -czf to create compressed files and the copying them to a remote location that also gets backed up to tape every day. As I write this, I am thinking I should add /usr/share/perl5 and /usr/share/perl to the list. Is there anything else needed that won't easily install from a Debian install? My approach on this is to have a backup of all the unique items needed for Koha, so I can do a clean install of Debian with Apache2 and MySQL, then restore from the backups and go. As there will be core items that change depending on the hardware config, I don't think I can just backup the entire debian file system and transfer it to a new machine. Thanks, Doug Dearden Director, Information Technology School for Advanced Research (formerly School of American Research) (505)954-7220 www.sarweb.org
Doug, If you get an answer off-list, please send to me. Everyone, just let me know if this is right and if so I'll add it to the manual. --- Nicole C. Engard Open Source Evangelist, LibLime (888) Koha ILS (564-2457) ext. 714 nce@liblime.com AIM/Y!/Skype: nengard http://liblime.com http://blogs.liblime.com/open-sesame/ On Thu, Dec 18, 2008 at 11:49 AM, Doug Dearden <dearden@sarsf.org> wrote:
Hello all,
I want to check to make sure I am backing up Koha correctly. I looked at this reference:
http://www.kohadocs.org/Backups_and_Restoring.html
It refers to the file structure for an earlier version. I couldn't find anything in the doc at https://sites.google.com/a/liblime.com/koha-manual/ , but maybe I am missing something there. Here is what I came up with:
Backup the database using:
mysqldump --add-drop-table -u<dbusername> -p<dbpassword> koha > koha.sql
I am running multiple databases, and am repeating the above for each unique database name.
Backup all of the files in /usr/share/koha .
Backup the extra config files in:
/etc/koha /etc/apache2 /etc/mysql/my.cnf
I am also backing up these as I made changes to them - perhaps unique to my install:
/etc/vsftpd.conf /etc/network /etc/hosts
I am using cron to run several scripts that do the above, using tar -czf to create compressed files and the copying them to a remote location that also gets backed up to tape every day.
As I write this, I am thinking I should add /usr/share/perl5 and /usr/share/perl to the list.
Is there anything else needed that won't easily install from a Debian install? My approach on this is to have a backup of all the unique items needed for Koha, so I can do a clean install of Debian with Apache2 and MySQL, then restore from the backups and go. As there will be core items that change depending on the hardware config, I don't think I can just backup the entire debian file system and transfer it to a new machine.
Thanks,
Doug Dearden Director, Information Technology School for Advanced Research (formerly School of American Research) (505)954-7220 www.sarweb.org _______________________________________________ Koha mailing list Koha@lists.katipo.co.nz http://lists.katipo.co.nz/mailman/listinfo/koha
mysqldump --add-drop-table -u<dbusername> -p<dbpassword> koha >koha.sql
You must add --single-transaction option to dump a consistent state of Koha DB. You may want to add compression on the fly rather than after dump to spare disk space: mysqldump --add-drop-table --single-transaction \ -u<dbusername> -p<dbpassword koha | gzip >koha.sql -- Frédéric
I am doing something similar. I use a file from sourceforge.net call AutoMySQLBackup. Very easy to edit and make it executable. http://sourceforge.net/projects/automysqlbackup I run backups on a regular basis and have even done a restore from one box to another with no problems. John +-------------------------------------------+ John Chadwick, Ed.D. Information Technology Manager New Mexico State Library 1209 Camino Carlos Rey Santa Fe, NM 87507 505-476-9740 505-476-9761 (FAX) John.Chadwick@state.nm.us -----Original Message----- From: koha-bounces@lists.katipo.co.nz [mailto:koha-bounces@lists.katipo.co.nz] On Behalf Of Doug Dearden Sent: Thursday, December 18, 2008 9:50 AM To: koha@lists.katipo.co.nz Subject: [Koha] Backing up 3.0 Hello all, I want to check to make sure I am backing up Koha correctly. I looked at this reference: http://www.kohadocs.org/Backups_and_Restoring.html It refers to the file structure for an earlier version. I couldn't find anything in the doc at https://sites.google.com/a/liblime.com/koha-manual/ , but maybe I am missing something there. Here is what I came up with: Backup the database using: mysqldump --add-drop-table -u<dbusername> -p<dbpassword> koha > koha.sql I am running multiple databases, and am repeating the above for each unique database name. Backup all of the files in /usr/share/koha . Backup the extra config files in: /etc/koha /etc/apache2 /etc/mysql/my.cnf I am also backing up these as I made changes to them - perhaps unique to my install: /etc/vsftpd.conf /etc/network /etc/hosts I am using cron to run several scripts that do the above, using tar -czf to create compressed files and the copying them to a remote location that also gets backed up to tape every day. As I write this, I am thinking I should add /usr/share/perl5 and /usr/share/perl to the list. Is there anything else needed that won't easily install from a Debian install? My approach on this is to have a backup of all the unique items needed for Koha, so I can do a clean install of Debian with Apache2 and MySQL, then restore from the backups and go. As there will be core items that change depending on the hardware config, I don't think I can just backup the entire debian file system and transfer it to a new machine. Thanks, Doug Dearden Director, Information Technology School for Advanced Research (formerly School of American Research) (505)954-7220 www.sarweb.org _______________________________________________ Koha mailing list Koha@lists.katipo.co.nz http://lists.katipo.co.nz/mailman/listinfo/koha ______________________________________________________________________ This inbound email has been scanned by the MessageLabs Email Security System. ______________________________________________________________________ Confidentiality Notice: This e-mail, including all attachments is for the sole use of the intended recipient(s) and may contain confidential and privileged information. Any unauthorized review, use, disclosure or distribution is prohibited unless specifically provided under the New Mexico Inspection of Public Records Act. If you are not the intended recipient, please contact the sender and destroy all copies of this message. -- This email has been scanned by the Sybari - Antigen Email System.
Doug -- Your process sounds pretty good. I would leave out the perl directories or at least treat them separately from your daily data backup. We should differentiate between different kinds of backups: - data: mysqldump, the most important part to backup from a production system - application/configuration: koha directories and conf files, including any customization - system: everything else. The goals of these are different. Data is the most volatile and is exclusively internal to the application. Everybody should backup their data and mysqldump is the plainest way to do it. The application itself and configuration shouldn't change between installations or upgrades. The premise is that if you have the data, you can rebuild Koha by repeating installation steps on any system and loading in the data. Backing these up every day when they are expected to be unchanged is overkill. For disaster recovery purposes or shorter recovery windows, or where you can't be trusted to complete a second installation, you start getting into the other two types of backups. These are files on the filesystem and not data from a database. Note that the koha directories may be in different places depending on the type of installation performed, so the backup will not necessarily be useful (and could be harmful) if applied on a different system. This makes it hard to script explicit steps that are still generic enough to satisfy everybody. IMHO, the koha manual shouldn't get involved with anything beyond data backups. The rest is for the sysadmin of a given system to decide. --Joe Atzberger On Thu, Dec 18, 2008 at 11:49 AM, Doug Dearden <dearden@sarsf.org> wrote:
Hello all,
I want to check to make sure I am backing up Koha correctly. I looked at this reference:
http://www.kohadocs.org/Backups_and_Restoring.html
It refers to the file structure for an earlier version. I couldn't find anything in the doc at https://sites.google.com/a/liblime.com/koha-manual/ , but maybe I am missing something there. Here is what I came up with:
Backup the database using:
mysqldump --add-drop-table -u<dbusername> -p<dbpassword> koha > koha.sql
I am running multiple databases, and am repeating the above for each unique database name.
Backup all of the files in /usr/share/koha .
Backup the extra config files in:
/etc/koha /etc/apache2 /etc/mysql/my.cnf
I am also backing up these as I made changes to them - perhaps unique to my install:
/etc/vsftpd.conf /etc/network /etc/hosts
I am using cron to run several scripts that do the above, using tar -czf to create compressed files and the copying them to a remote location that also gets backed up to tape every day.
As I write this, I am thinking I should add /usr/share/perl5 and /usr/share/perl to the list.
Is there anything else needed that won't easily install from a Debian install? My approach on this is to have a backup of all the unique items needed for Koha, so I can do a clean install of Debian with Apache2 and MySQL, then restore from the backups and go. As there will be core items that change depending on the hardware config, I don't think I can just backup the entire debian file system and transfer it to a new machine.
Thanks,
Doug Dearden Director, Information Technology School for Advanced Research (formerly School of American Research) (505)954-7220 www.sarweb.org _______________________________________________ Koha mailing list Koha@lists.katipo.co.nz http://lists.katipo.co.nz/mailman/listinfo/koha
"Doug Dearden" <dearden@sarsf.org> writes:
I want to check to make sure I am backing up Koha correctly. I looked at this reference:
-- Mahesh T. Pai || http://paivakil.blogspot.com Learn from the mistakes of others. You won't live long enough to make all of them yourself.
Ugh!!1 Apologies; I misposted. paivakil@gmail.com (Mahesh T. Pai) writes:
"Doug Dearden" <dearden@sarsf.org> writes:
I want to check to make sure I am backing up Koha correctly. I looked at this reference:
This is what I intended to ask:- What are pros and cons of making a backup of /var/lib/mysql/ ?? What is there in /usr/share/koha/* to be backed up? I mean, if something here is corrupted / goes bad, would not a simple re-install of koha work? Further, if Koha stores user / login info here, is this not a violation of the Filesystem Standards? Should not such info go into some place under /var/ ?? -- Mahesh T. Pai || http://paivakil.blogspot.com A: Because it fouls the order in which people normally read text. Q: Why is top-posting such a bad thing? A: Top-posting. Q: What is the most annoying thing on usenet and in e-mail?
Mahesh T. Pai wrote:
What are pros and cons of making a backup of /var/lib/mysql/ ??
Cons: don't do it! If you do, you *must* stop the mysqld daemon first. Pros: there aren't any. Read up on mysqldump. It allows you to take a live but integral backup of a running mysql system, "on the fly". A compressed database dump is as easy as something like the following: mysqldump --opt Koha | gzip > Koha-db-backup.sql.gz The output from mysqldump is a set of SQL statements that can be rerun anytime to re-create the database snapshot taken at backup time.
What is there in /usr/share/koha/* to be backed up? I mean, if something here is corrupted / goes bad, would not a simple re-install of koha work? Further, if Koha stores user / login info here, is this not a violation of the Filesystem Standards? Should not such info go into some place under /var/ ??
AFAIK, there should be nothing in /usr/share/koha to backup. Of course, you should save any customisations you have made to the Koha source tree, but that is not really part of backup, is it? You should also backup any config files in /etc and poke around in /var for anything you might want to keep, like log files. cheers rickw p.s. if there is a violation of the Filesystem Standards, who do we call? -- _________________________________ Rick Welykochy || Praxis Services Beauty is only skin deep, but ugly goes clean to the bone. -- Dorothy Parker
Mahesh T. Pai wrote:
Ugh!!1 Apologies; I misposted.
paivakil@gmail.com (Mahesh T. Pai) writes:
"Doug Dearden" <dearden@sarsf.org> writes:
I want to check to make sure I am backing up Koha correctly. I looked at this reference:
This is what I intended to ask:-
What are pros and cons of making a backup of /var/lib/mysql/ ??
What is there in /usr/share/koha/* to be backed up? I mean, if something here is corrupted / goes bad, would not a simple re-install of koha work? Further, if Koha stores user / login info here, is this not a violation of the Filesystem Standards? Should not such info go into some place under /var/ ??
koha database backup is enough, no need of backing up usr/share/koha/* unless you have done any custom changes which is not there in default koha installation... -- Anand Sharma RDG Library Services, Mumbai, India. 091-9870339028,091-9220579647 ----------------------------------------------------- Free Software is a matter of freedom, not cost. It is a matter of liberty, not price. http://fsf.org | http://gnu.org -----------------------------------------------------
participants (8)
-
Anand Sharma -
Chadwick, John, DCA -
Doug Dearden -
Frederic Demians -
Joe Atzberger -
Nicole Engard -
paivakil@gmail.com -
Rick Welykochy