Discussion:
Can rsync server mark deleted source files as extraneous?
Wolfram Volpi via rsync
2017-07-25 16:56:24 UTC
Permalink
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 via rsync
2017-07-25 17:38:06 UTC
Permalink
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.
Post by Wolfram Volpi via rsync
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.
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. ***@FutureQuest.net (work)
Orlando, Florida ***@sanitarium.net (personal)
Web page: http://www.sanitarium.net/
PGP public key available on web site.
~*-,._.,-*~'`^`'~*-,._.,-*~'`^`'~*-,._.,-*~'`^`'~*-,._.,-*~'`^`'~*-,._.,
Loading...