Iain Buchanan writes:

> On Thu, 2010-04-29 at 16:44 +0200, Alex Schuster wrote:
> 
> [snip]
> 
> > All my partitions are LVM volumes, so before the backup starts, I
> > make a LVM snapshot of the partition. This way I can modify it while
> > the backup is still in progress.
> 
> hmm, never got into LVM.  Sounds interesting though...

It is. it gives you great flexibility. Your /home is becoming too small? 
So just add a Gigabyte:
  lvresize -L +1G /dev/system/home 
  resize2fs /dev/system/home

Takes half a minute, and you don't need to unmount anything before that.

You want to backup your large /home partition, and want to continue 
working meanwhile? Create a snapshot, mount it, and backup this:
  lvcreate -s -L 1G -n home-snapshot /dev/system/home
  mount /dev/system/home-snapshot /mnt


> [snip]
> 
> > I wrote a shell script to do this, so I do not have to issue a lot of
> > commands every time I want to do the backup.
> 
> I don't use too many commands, something like this
> in /etc/cron.daily/custom-backup:
> 
> sudo /usr/bin/ionice -c 3 /usr/bin/rsync -aAx --exclude suspend_file
> --delete-delay --delete-excluded --partial
> --human-readable / /<unique-mount-of-external-drive> || echo external
> backup failed!

That's okay, I did it in this way, too. Well, the backup may be 
inconsistent when you are modifying the root partition in the meantime, so 
I would not emerge things when the backup is running.
But now I am using LVM for everything, and so I just create a snapshot.
And I prefer to use rdiff-backup, so I can have incremental backups.

> >  As there are now some others
> > using this script, adapted to their needs, I started to rewrite it in
> > a way that it reads a config file, and no modification of the script
> > itself is necessary. If anyone is interested, send me an email.
> 
> interested! So is it on sourceforge yet ;)

Um, no... not yet. Not really sure if it belongs there...

The script has become a little large, but I think it's working now. I will 
do some testing, and inform you when it's done. I'm a little ill at the 
moment, so it may take 1-2 more days.

        Wonko

Reply via email to