[Koha] Backing up 3.0

Doug Dearden dearden at sarsf.org
Fri Dec 19 08:33:13 NZDT 2008


Hi Joe,

I agree with your analysis.  Rereading my post I realize I gave the
impression that ll of the scripts run every day, when only the database
related scripts run daily.   I am not backing up the file system and
config every day, I just want a backup so I can restore quickly if I
need to.  I do have several scripts to deal with the various pieces
separately (database, configs, koha files with customizations).  As I
had quite the task getting all of the Koha prerequisites in place, in
particular all the perl modules I would like to get a good backup of
those that I can restore if needed to a new server.  My thoughts on a
restore would be to install the basic Debian system from the CD, then
install MySQL and Apache2 using apt-get or aptitude.  With that base
system in place I could then copy the rest of the files needed including
all of the Perl modules and the koha files, copy in my custom config
files and then restore the database.

As I write this I think the piece I am missing, is where all of the
Perl modules that are prerequisites for Koha are installed.  On a
regular Debian install would these all be in /usr/share/perl,
/usr/share/perl5, /usr/lib/perl, and /usr/lib/perl5?

Am I missing another directory with prerequisites that I haven't
thought of?

Thanks,

Doug

>>> "Joe Atzberger" <ohiocore at gmail.com> 12/18/2008 11:16:33 AM >>>
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 at 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 at lists.katipo.co.nz 
> http://lists.katipo.co.nz/mailman/listinfo/koha 
>


More information about the Koha mailing list