Quote:
Originally Posted by syg00
That is exactly what a snap does. Maybe you need to read up on how copy-on-write works - perhaps think of it as a de-dup for your original data and any snaps.
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.
|
Thank you for that, Syg00 & 5871519 ?
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