Can rsync server mark deleted source files as extraneous?

Kevin Korb kmk at
Tue Jul 25 17:38:06 UTC 2017

There are two different ways to handle this...

#1 rsync --link-dest.  Each rsync is to a new empty timestamped dir.
Files that have not changed are hard linked from the previous run.  The
result is many timestamps complete trees that can be restored as was at
the time of the run.

#2 rsync --backup-dir.  Each file that would be replaced or deleted is
instead moved into the backup directory.  The backup directory can be
time stamped to make pruning easier.

On 07/25/2017 12:56 PM, Wolfram Volpi via rsync wrote:
> rsync --delete option tells rsync to delete extraneous files from the
> receiving side (ones that aren't on the sending side).
> But if a user accidentally deletes a file, there is no way to restore it
> from the server.
> If --delete option is not used, and the local hard disk is destroyed,
> restored data will include old deleted files.
> Is there a way for rsync server to retain backup of deleted source
> files, and mark them as extraneous?
> That way a directory can be restored from backup, excluding the old
> deleted files.
> It could work something like this:
>     when rsync server notices an unmarked extraneous file, it timestamps
> and marks the file as extraneous.
>     rsync server periodically deletes extraneous files like this
>         if (extraneous_mark == true and timestamp > current_date - age),
> then delete the file
>     where age is number of days extraneous files are retained.
>     rsync client can restore deleted files from server.
>     rsync client can restore directory from server, excluding extraneous
> files.
> Thank you,
> Wolfram Volpi

	Kevin Korb			Phone:    (407) 252-6853
	Systems Administrator		Internet:
	FutureQuest, Inc.		Kevin at  (work)
	Orlando, Florida		kmk at (personal)
	Web page:
	PGP public key available on web site.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 224 bytes
Desc: OpenPGP digital signature
URL: <>

More information about the rsync mailing list