[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Filesystem snapshots



Thank you Graham and Florian,

I'd have thought my problem was commonplace. The machine is a server. It has to remain available continuously and can be updated at any moment. It handles, for example, SQL updates and email, I can't just switch it to read-only for the duration of the backup.

The LVM process allocates a bit of scratch disk elsewhere to be read-write, marks the whole of my normally-read-write partition as read-only, and intercepts all that partition's write activity and puts it onto the scratch space. Any subsequent reading from that partition takes account of those updates, but the partition mount from which I'm backing up remains read-only until I've finished - because all the writes have been diverted.

When I've finished, the partition goes back to read-write after the scratch area updates are merged back into it, so it ends up just how it would have been if I'd not gone near it. The effect is as though it had remained read-write all the time, but the backup was taken from a stable read-only condition. When Graham writes "Shouldn't you be making the backup from a read-only copy of your filesystem", yes, definitely. That's why I don't understand how anyone can archive from a home directory on a desktop without, for instance, closing X and logging out the user. Nothing short of that is going to allow the home directory to be made read-only. Unless a snapshot is taken at some level, and the snapshot used for the backup.

I will, as both of you agree, move the cache elsewhere. I hadn't thought of that. Even so, I still need to keep the SQL and email-server process writeable throughout the backup.

John Harris