using bazaar to backup files over a LAN

John Arbash Meinel john at arbash-meinel.com
Sun Aug 24 00:01:36 BST 2008


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

Rahul Nabar wrote:
> I've successfully been using Bazaar for a few months now to back up /
> rollback system config files on my Linux server. This server also has
> a disk backup solution running.
> 
> We added a second server but this one will not have a Disk Backup. The
> servers hav good mutual LAN connectivity. I was wondering if I can
> have Bazaar somehow step in and thus maintain backups of a few
> critical config files from server2 by maintaining a bzr repo on
> server1. (this way the repo will keep getting a safe tape backup)
> 
> Any suggestions how I ought to go about this?
> 
> 

I would probably just have a checkout on server2 of the repo on server1. Since
you have bzr on both machines, this can be as simple as:


SERVER1$ bzr init-repo --no-trees /srv/server2
SERVER1$ bzr init /srv/server2/etc

SERVER2$ cd /etc
SERVER2$ bzr checkout bzr+ssh://server1/srv/server2/etc
SERVER2$ bzr add files to care about
SERVER2$ bzr commit -m "Added important files"

If the network is *really* good, you could even change that to "bzr checkout
- --lightweight", which will only keep enough information to manage what files
are versioned, and everything else will reside on SERVER1.

The other thing is you may want to play with "bzr ignore" in case you don't
want to version specific files. Personally, I set up my etc by ignoring a few
files and then adding almost everything.

You might also want to look into "etckeeper" which is a debian package (IIRC),
and can use a few different VCSes (bzr included) as the storage system. The
main difference is that "etckeeper" will also manage file permissions. So that
when restoring, you don't accidentally set your secret password file as
world-readable.

Note: I have not *used* etckeeper, I just know it exists and is meant to
handle that sort of thing.

John
=:->
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFIsJbQJdeBCYSNAAMRArJXAJ4pTvVoc87Fpv5MylMbpBGPntEboACgoF1J
D4lpY3pC5pXCZUGrBq93NQA=
=INZd
-----END PGP SIGNATURE-----



More information about the bazaar mailing list