Skip navigation

This rsync command will create a full backup of a folder, deleting extraneous files at the destination, preserving all file permissions / ownerships and displaying progress. Useful for creating / syncing a regular backup to an external drive or network share without re-transferring unmodified files.

rsync -aP --del /path/to/src /path/to/dest

Note that omitting a trailing slash on the src path will cause rsync to create the src directory at the dest location.

Be Sociable, Share!

Leave a Reply

Your email address will not be published. Required fields are marked *


seven − 6 =

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code class="" title="" data-url=""> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong> <pre class="" title="" data-url=""> <span class="" title="" data-url="">