Once Off Point in time snapshot
Hi,
https://www.centos.org/docs/5/html/C...t_command.html Only shows how to create a lvm snapshot that continues to grow. How can I create a once-off kind of point-in-time snapshot that I can save as a backup? Thanks in advance |
A snapshot *IS* point-in-time.
The reason it keeps growing is that as the source is updated, the "pre-update" blocks are copied to the snap to ensure the P-i-T consistency. Snaps are not a good backup in themselves, but they are a superb source for a backup. What I do is take a snap then copy that off at my leisure to some permanent backup media. Then the snap can be deleted to stop it continually consuming (more) space. Snaps have to be managed, but they are the best thing for data consistency. |
Quote:
I found the following: lvcreate -L 1GB -s -n My-ROOT_snap /dev/vg_root/root I will see if this one is the growing type too. TIA |
Quote:
When you reference the data in a snap, unchanged blocks are retrieved from the original data, while changed blocks are read from the snap itself. All the data are as they were at the time of the snap. This is why I can use a snap as a source for a backup - and it doesn't when I actually do the backup. I don't use LVM snaps but btrfs, but conceptually they are similar in effect. I regularly take a snap before I work on my photos - if I screw up I revert to the snap and all my (bad) changes are gone. Else if I'm happy with the work, I simply delete the snap. Maybe you are hoping to do similar. |
Quote:
I have a few more questions on this, if you all don't mind... Linux snapshot scenarios ==================== 1) On 1 Jan, create a snapshot of /etc 2) On 2 Jan, change /etc/hosts 3) On 3 Jan, make another change to /etc/hosts 4) On 4 Jan, make a change to /etc/sysconfig/network Q1) Is it still possible on 6 Jan, to restore /etc/hosts from the lvm snapshot to what it looked like on 1 Jan? Q2) Which copy of /etc/hosts will be on the system if the snapshot is rolled back on 7 Jan? Q3) If I send the snapshot across to a different system using dd or scp, what which of the /etc/host versions will arrive on the other system? TIA |
All times are GMT -5. The time now is 12:48 AM. |