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

From: GarconDuMonde <gdm_at_fifthhorseman.net>
Date: Tue 20 Dec 2005 - 12:58:59 GMT
Message-ID: <43A80013.7060208@fifthhorseman.net>

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

hi,

Gerhard Hofmann wrote:
> 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'm a newbie too, don't worry ;-)

> 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.
>
> What is the best way to invoke the mysqldump command within myvserver? A
> separate cron job within the guest?

the best solution i have found is backupninja [1]:

        Backupninja allows you to coordinate system backup by dropping a few
        simple configuration files into /etc/backup.d/. Most programs you might
        use for making backups don't have their own configuration file format.
        Backupninja provides a centralized way to configure and schedule many
        different backup utilities.

furthermore, the current backupninja version, 0.9.1 (soon to be 0.9.2) is fully
configured to work with vservers. tbh, i've had a little bit of difficulty with
some of it - particularly the duplicity handler, but by sticking to some of the
basic scripts, i am able to get it to work well:

        success -- /etc/backup.d/10.sys
        success -- /etc/backup.d/20.mysql
        success -- /etc/backup.d/90.rdiff

to configure the mysql backups, i had to get a bit of additional advice:

< micah> gdm: you can use the poorly documented mysql vserver capability
< micah> set this in /etc/backupninja.conf:
< micah> vservers = yes
< micah> then set your username/passwd, databases = all,
         hotcopy/sqldump,compress stuff
< micah> in the mysql file in /etc/backup.d
< micah> and also set:
< micah> vsname = mysql
< micah> to be the name of your vserver that has mysql in it

if you have further questions, please feel free to write. if people are
interested, i'll see if i can get some of my particular configurations up on the
wiki or something.

[1] http://dev.riseup.net/backupninja
- --

love and solidarity,

        --gdm

http://docs.indymedia.org/view/Main/GarconDuMonde

i have a NEW key:
gpg --keyserver pgp.mit.edu --recv-keys 594B97C2
Key fingerprint = 7B70 F22D F275 D111 3A04 F9EE 0E25 4944 594B 97C2

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (Darwin)

iD8DBQFDqAASDiVJRFlLl8IRAuK5AJ9CaY4IcNkBxWLBMXM53ll0S2ejswCfX/DF
p0RNIOUBBjsWN8tl4s3NQwQ=
=+uev
-----END PGP SIGNATURE-----
_______________________________________________
Vserver mailing list
Vserver@list.linux-vserver.org
http://list.linux-vserver.org/mailman/listinfo/vserver
Received on Tue Dec 20 12:59:26 2005

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