07 Mar 2008 21:47
TAGS: blog dev ext3 filesystem fs linux lvm snapshot
Today I've learnt about making snapshots of regular filesystems in Linux.
First of all, this is a link to the article I've found and seems to be quite OK: http://howtoforge.com/linux_lvm_snapshots_p2
The idea is simple. We have to:
- Have LVM partition
- Set up some (I believe this is not limited to standard ext3) partitions on it
- Prepare some place for backups (over network or on a separate disk)
- Then at any time, we can just create a snapshot - this does not really consume MUCH resources — but consumes SOME.
- This takes not more than 1 second and creates a device/file/something that is an image of the filesystem in the exact moment of creating the snapshot.
- Having the image (snapshot) we can do anything with it (like with a block device) — mount (and backup the files), create a raw-copy, export to another machine, clone, whatever.
- The author believes one can safely restore a backup without even restarting services.
- Will we need to rely on this? 60 seconds of down-time is acceptable and guaranties that nothing bad happens.