On 2023-09-20, Frank Steinmetzger <war...@gmx.de> wrote: > Am Wed, Sep 20, 2023 at 10:57:00PM +0100 schrieb Victor Ivanov: > >> On Wed, 20 Sept 2023 at 22:29, Grant Edwards <grant.b.edwa...@gmail.com> >> wrote: >> > >> > That depends on how long it takes me to decide on tar vs. rsync and >> > what the appropriate options are. >> >> I've done this a number of times for various reasons over the last 1-2 >> years, most recently a few months ago due to hard drive swap, and I >> find tar works just fine: >> >> $ tar -cpf /path/to/backup.tar --xattrs --xattrs-include='*.*' -C / . > > Does that stop at file system boundaries (because you tar up '/')? I think > it must be, otherwise you wouldn’t use it that way. > But when copying a root file system, out of habit I first bind-mount it in a > subdirectory and tar/rsync from there instead. This will also make files > visible which might be hidden under an active mount.
The partition/fs being backed up isn't live (it's mounted, but it's not the root partition of the host doing the backup), so nothing is mounted within it and there aren't any /proc or /sys entries in it. So, in this case there's no need to worry about crossing filesystem boundaries. -- Grant