DO NOT REPLY [Bug 6307] New: --remove-source-files removes files if source and destination are the same

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

DO NOT REPLY [Bug 6307] New: --remove-source-files removes files if source and destination are the same

samba-bugs
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: [hidden email]
        ReportedBy: [hidden email]
         QAContact: [hidden email]


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.
--
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
Reply | Threaded
Open this post in threaded view
|

DO NOT REPLY [Bug 6307] "rsync --remove-source-files foo/ foo/" should not delete files

samba-bugs
https://bugzilla.samba.org/show_bug.cgi?id=6307


[hidden email] changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |[hidden email]




------- Comment #1 from [hidden email]  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.
--
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
Reply | Threaded
Open this post in threaded view
|

[Bug 6307] "rsync --remove-source-files foo/ foo/" should not delete files

samba-bugs
In reply to this post by samba-bugs
https://bugzilla.samba.org/show_bug.cgi?id=6307

--- Comment #2 from [hidden email] <[hidden email]> ---
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.
--
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