Re: Fwd: [3.1.3] --remove-source-files $SRC/ $SRC/ - erases all files

Roland via rsync <[email protected]>
Newsgroups gmane.network.rsync.general
Message-ID <[email protected]>
why not avoid using "--remove-source-files" and delete files
manually/via extra step afterwards ?

Am 17.10.22 um 08:59 schrieb Sridhar Sarnobat via rsync:
> 90% of my data losses are caused by rsync'ing from dir A to dir A
> (accidental incorrect copy and paste, or where dir B is a symlink to
> dir A). The source gets erased unintentionally.
>
> It may seem dumb but when you get really long commands and really long
> file paths it will happen a 1-2 times a yearwhen I'm doing it
> dozens/hundreds of times every week.
>
> *Is there an existing mechanism to protect against this?* rsync should
> logically never erase all copies of data.
>
> I know I can backup files (which I do for my smaller drives), or
> create wrapper scripts but I'm not asking about those.I don't think
> adopting --dry-run is practical being such a heavy user (and moreover,
> it's unlikely to warn what will happen).
>
> I'm not a C developer so I probably can't do this myself but if
> anyone's encouraging me to then I'd give it a shot.
>
>
> Sridhar Sarnobat
> San Jose, CA 95128 | USA
> Phone: +1 (650) 260-3851 | [email protected]
> SMS me via email: [email protected]
> Google Chat: [email protected]
> http://www.facebook.com/sridhar.sarnobat
> http://www.linkedin.com/in/sarnobat <http://www.linkedin.com/in/sarnobat>
> http://github.com/sarnobat
>
>

-- 
Please use reply-all for most replies to avoid omitting the mailing list.
To unsubscribe or change options: https://lists.samba.org/mailman/listinfo/rsync
Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.