Some Useful Options for Rsync

Valic —  August 9, 2011 — Leave a comment

Rsync is often used for backup systems, with options such as:

-A --acls       : preserve the ACL, if used

-X --xattrs     : preserve extended attributes, if used

-H --hard-links : detect and preserve hard links

-a --archive    : resources and preserve the usual attributes: symbolic links, devices and special files,
user and group ownership, permissions and schedules

In addition to these stock options, rsync has many other.

Each has its own recipe, but I’d like to share two useful features :

–fake-super :

This option – super-fake offers a backup of inside information without root privileges. It works by adding special attributes as user.rsync extended. Of course, it still requires a destination file system that supports extended attributes.

This provides a good way to boost the reserves of the system without undermining its security by opening a root access on the target system.

When you backup an entire system or anything that requires keeping ownership of files or information on the device, you must have root privileges on the target system. Without them, could not properly rsync chown  the target files.

–numeric-ids :

By default, rsync uses the UID and GID literal if you can find matches in both the source and destination.

This option – numeric-ids forces rsync to use numeric IDs instead of trying to map. Is a particular need for backup systems in prison (BSD jails, OpenVZ) That appear to have fake identification when viewed from its host, because they have their own maps of ID.



Posts Twitter Facebook

Editor in Chief at Debian-Tutorials, Linux enthusiast.

No Comments

Be the first to start the conversation.

Leave a Reply