In this article, it’s explained how to use rsync for a full system backup.
Backup all the filesystem
It’s needed just one command in shell, with root privileges, to perform a complete backup.
# rsync -aAXv --exclude={"path/to/excluded/directories"} / /path/to/destination
This command depends on brace expansion available in bash and zsh.
The
With
The
-aAX
arguments are needed for ensuring that symbolic links, devices, permissions and ownerships, modification times, ACLs and extended attributes are preserved.With
--exclude
option users’ can specify folders that has not to be copied to destination; usually this string contains /dev, /sys, /run, /tmp, /proc. Could be necessary to add also /mnt or /media if they’ll not be used as backup destination folder, otherwise could start an infinite loop.Restoring backup
Restoring backup is easy as making it. It’s the same command, but with with source and destination reversed.
Remember that a gold rule is to make three backup copies, and put them in different locations; computers permits an easy access and management of your informations, but it’s also easy lose everything, so, prudence is never enough.
Remember that a gold rule is to make three backup copies, and put them in different locations; computers permits an easy access and management of your informations, but it’s also easy lose everything, so, prudence is never enough.
No comments:
Post a Comment