rsync entire root filesystem to a local device

This can be used to snapshot an entire server, useful for keeping a copy before migrating a VPS, for example.

rsync -avxHAX --progress ./local_backup_dir

The options are:

-a : all files, with permissions, etc..

-v : verbose, mention files

-x : stay on one file system

-H : preserve hard links (not included with -a)

-A : preserve ACLs/permissions (not included with -a)

-X : preserve extended attributes (not included with -a)

Other options:

-W : this is --whole-file, prevents trying to do delta copies

--numeric-ids : keep the original UID/GID number, don't remap