On 11/15/22 06:27, rhkra...@gmail.com wrote:
I'm not really clear on the concept of a snapshot (for backup) -- I've done a
little googling but haven't found an explanation that "satisfies" me.
In this email I want to hyptothesize on what a snapshot might be in the hope
that others can correct / amplify it when I go wrong.
Starting from a beginning, I suppose I could copy the entire contents of
whatever I wanted to make a snapshot of (by any of a variety of tools -- dd,
cp, ...) and call that a snapshot, although the more common name for it would
be a "full backup".
Later, I could copy any files (as files) that have changed since the date I made
the full backup and call that a snapshot. (I might use find to identify the
files that have changed, and then any of a variety of tools to actually copy
them somewhere (and call that a shapshot).)
I suppose it wouild be possible to do something like this at a block level,
that is copying only blocks of a file which have changed. (Not sure which
commands might help me do that, but I don't think I'd really be interested in
doing that.)
I also hear (i.e., read) statements from which I infer that some snapshots
included only the metadata of the files (or blocks???), but I'm not sure of the
value of either of those to me -- how can you reconstruct a possibly missing
file (or block) from the metadata?
In the content of computers, "backup" has many meanings for myself:
1. Copying files and directories from one filesystem to another
filesystem, using tools such as cp(1), scp(1), and rsync(1). Both
filesystems are mounted.
2. Copying files and directories to a database or file structure, using
tools such as amanda(8) and borg(1). The source filesystem is mounted
and the destination may be files and directories on a mounted filesystem.
3. Serializing files and directories to a file, using tools such as
cpio(1) and tar(1). (I tend to use the term "archive".) The source
filesystem is mounted and the destination file is on a mounted filesystem.
4. Serializing a filesystem to a file, using tools such as dump(8). (I
tend to use the term "dump".) The source filesystem is not mounted and
the destination file is on a mounted filesystem.
5. Storage media used to store "backups", created by whatever means;
umounted or unmounted.
6. Secondary networks, hardware, software, data, etc. ("resources") that
can be used in place of primary resources.
I expect there are many more meanings for "backup"; both those that I
have forgotten and meanings known to other people.
Of course, a reverse operation is desirable -- e.g. "restore".
For myself, "snapshot" is a feature of advanced filesystems and volume
managers, such as btrfs(8), zfs(8), and lvm(8). My understanding is
that snapshots are internal to the filesystem or volume manager.
Additional operations include "roll back", "send", "receive",
"replicate", and "destroy". Of course, snapshots can be backed up, to
backup media or servers, etc..
Related terms include "image" and "clone", which operate at the device
(block) level using tools such as dd(1). Operations include copying one
device to another device ("cloning"), serializing a device to a file
("taking an image"), and deserializing a file to a device ("restoring an
image"). Sophisticated tools such as clonezilla
(https://clonezilla.org/) understand and can perform partitioning,
volume, filesystem, bootloader, and other operations.
To further add confusion, people can and do use the above terms both as
verbs and as nouns, in multiple contexts, in the same sentence.
David