Re: [Vserver] recommended way to backup vserver guests with nightly cron job?

From: Michael S. Zick <mszick_at_morethan.org>
Date: Tue 20 Dec 2005 - 13:35:09 GMT
Message-Id: <200512200735.09600.mszick@morethan.org>

On Tue December 20 2005 03:30, Gerhard Hofmann wrote:
> Hi list,
>
> I'm a newbie to vserver and I wonder how to backup my vserver guests
> with a cron job run by the vserver host.
>
> I think it should be something like that:
> vserver myvserver stop
> ...compress /etc/vserver to a tgz file and save on external storage...
> vserver myvserver start
>
> Have I forgotten something important here?
>
> Myvserver will run mysql and apache (TYPO3 content management system),
> so I think it won't hurt to run a mysqldump before shutting down and
> backing up myvserver.
>
That would give you the most consistent backup of the content management
system. Of course it means there is a time-of-day when you can have the
vserver out of service.

One of the reasons for running mysqldump is so a consistent version of the
database files is dumped. An external-to-mysql backup program could catch
the database files in an inconsistent state.
But...
If you have shut down the vserver, you have also shut down mysql, the file
content is now static - if you don't need the mysqldump output for another
reason - then you could skip that step.

The same reasoning (system operation spans changes in multiple files)
applies to apache, the content management system as a whole and
the operation of the vserver.

So shutting it (the entire vserver) down gives you the most consistent
version of everything.

If the system is used 24/7 and you can't shut it down for backups,
then you could back it up with a host script that runs commands
in the vserver context.
(See Christian Heim's reply to this thread.)

If the system is used 24/7 and is heavily loaded at all times, then
things get tricky if you want a consistent set of files for the
content management system (and the vserver and apache).

Mike

> What is the best way to invoke the mysqldump command within myvserver? A
> separate cron job within the guest?
>
> TIA
> Gerhard
>
> _______________________________________________
> Vserver mailing list
> Vserver@list.linux-vserver.org
> http://list.linux-vserver.org/mailman/listinfo/vserver
>
>
_______________________________________________
Vserver mailing list
Vserver@list.linux-vserver.org
http://list.linux-vserver.org/mailman/listinfo/vserver
Received on Tue Dec 20 13:35:37 2005

[Next/Previous Months] [Main vserver Project Homepage] [Howto Subscribe/Unsubscribe] [Paul Sladen's vserver stuff]
Generated on Tue 20 Dec 2005 - 13:35:43 GMT by hypermail 2.1.8