You can safely leave out all the virtual filesystems (/proc, /sys, /dev, etc) and /tmp.
For systems where everything is on a single drive with just boot and root partitions, assuming target drive has just one partition, and that you don't mind not having the boot files in the root partition backup I use the following:
a: archive mode
x: do not cross file system boundaries
r: recurse into directories
v: verbose
H: preserve Hardlinks
A: preserve ACLs
x is needed not just because you don't want to backup the backup onto the backup but also to prevent backup of the virtual filesystems. The downside is that you need to rsync the boot partition separately.
For systems where everything is on a single drive with just boot and root partitions, assuming target drive has just one partition, and that you don't mind not having the boot files in the root partition backup I use the following:
- Mount the target drive somewhere e.g. /mnt
- Get a command line
Code:
sudo rsync -axrvHA / /mnt/- One of the following depending on where your chosen OS mounts the boot partition:
Code:
sudo rsync -axrvHA /boot /mnt/boot/Code:
sudo rsync -axrvHA /boot/firmware/ /mnt/boot/firmware/
a: archive mode
x: do not cross file system boundaries
r: recurse into directories
v: verbose
H: preserve Hardlinks
A: preserve ACLs
x is needed not just because you don't want to backup the backup onto the backup but also to prevent backup of the virtual filesystems. The downside is that you need to rsync the boot partition separately.
Statistics: Posted by thagrol — Mon Sep 30, 2024 4:46 pm