samba-bugs@samba.org
2009-Apr-30 17:10 UTC
DO NOT REPLY [Bug 6307] New: --remove-source-files removes files if source and destination are the same
https://bugzilla.samba.org/show_bug.cgi?id=6307
Summary: --remove-source-files removes files if source and
destination are the same
Product: rsync
Version: 3.0.5
Platform: x86
OS/Version: Linux
Status: NEW
Severity: normal
Priority: P3
Component: core
AssignedTo: wayned@samba.org
ReportedBy: cdauth+samba.org@cdauth.de
QAContact: rsync-qa@samba.org
I wanted to move the files of a directory (whose path was only slightly
different from the current directory) to the current directory. Unfortunately,
I errorneously passed the current directory as first parameter instead of the
other one. The rsync call was rsync --append -avAHSP --remove-source-files
/path/to/current/directory/ .
The files in the current directory were deleted. I think rsync should check
whether the source and the destination files are the same (like mv does, for
instance) and in that case prevent the files from being deleted.
--
Configure bugmail: https://bugzilla.samba.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug, or are watching the QA contact.
samba-bugs at samba.org
2010-Feb-21 02:34 UTC
DO NOT REPLY [Bug 6307] "rsync --remove-source-files foo/ foo/" should not delete files
https://bugzilla.samba.org/show_bug.cgi?id=6307
cooleyr at gmail.com changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |cooleyr at gmail.com
------- Comment #1 from cooleyr at gmail.com 2010-02-20 20:34 CST -------
A big _me too_ on this one.
"Gee, my main storage space is nearly full, I need to move it off to
another
disk immediately... It's kinda important so I don't want to use mv and
just
hope everything goes okay... You know, if I use rsync, I'll get file
checksuming, and some stats. Perfectly. Let me just wrap-off a quick cmd-line
before we run out of space. Perfect! Hmm, where'd they go? Dammit! 200
GBytes of 'didn't have a chance to back it up yet' data GONE.
Thanks rsync!"
While I recognize my mistake in all of this, and while important and
irreplaceable, the data wasn't critical, but I remain in a mild furor over
pretty much the one and only possible way this could go wrong, not being
checked for, despite how trivial doing so would be... This is just a complete
lack of design fore-thought on a critical-data tool. Combine this with the
terrible performance I'm seeing on filesystems with large numbers of
files/folders, and my days of promoting rsync are over. I guess it's time I
really check out Unison...
--
Configure bugmail: https://bugzilla.samba.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug, or are watching the QA contact.
samba-bugs at samba.org
2015-Jun-28 11:44 UTC
[Bug 6307] "rsync --remove-source-files foo/ foo/" should not delete files
https://bugzilla.samba.org/show_bug.cgi?id=6307 --- Comment #2 from tomboshoven at gmail.com <tomboshoven at gmail.com> --- Same for me. No data loss here, but a bunch of work undeleting the files and moving them back to the right directories. Files should only be removed if they are actually copied to another location. -- You are receiving this mail because: You are the QA Contact for the bug.