Re: Delete remote folder
At 17:57 02.06.2016, Steven Levine wrote: >>rsync -a --delete empty_local_folder remote_folder_to_delete > >>to get rid of the contents. However the folder itself still remains. So >>after a while I'd have a lot of empty folders. > >This comes up on the list every now and then. > >Here's a snip from an archive message: > > Here is how you would write an "rsyncrm" script that can be invoked like > "rsyncrm -ni remote::volume/directory". Note that this reveals the > attributes of the current directory to the server. > > #!/bin/bash > victim="${@: -1:1}" > rsync -d --del --filter="R /$(basename -- "$victim")" --filter='- /*' \ > "${@:1:$#-1}" . "$(dirname -- "$victim")" > >This works because it deletes the unwanted directory from the parent >directory. Took me some time to find out what it does but it actually seems to work, thanks a lot. Now let's see if this method can also be used to really prune empty dirs in the destination. Is there no page with rsync tips and tricks? Would be nice to have such cool commands collected in one place. bye Fabi -- 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
Re: rsync keeps writing files over
"McDowell, Blake" wrote: > The storage is just an regular HDD in a mac pro tower. I can't > imagine why it wouldn't handle timestamps. Also of note - this > problem doesn't exist for every file, just the vast majority. > So, that just makes it more confusing. The filesystem format (MacOS native? FAT?) might be a factor. > Yes, I imagine rsync is not the best for linear tape but give the > choice between cp (which is faster and causes less problems but > offers almost zero verbosity) and rsync, I???ll choose rsync. If > people know of other options, I???d be very happy to know of them. Best choice for magtape is probably something like tar, cpio, or pax (for a file-oriented backup), or the appropriate variant of dump(8) (to back up an entire filesystem -- but not all FS formats have a dump/restore suite available). -- 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
Re: rsync keeps writing files over
"McDowell, Blake" wrote: > The storage is just an regular HDD in a mac pro tower. Ah, is this the version of rsync that comes with OS X ? Are these HFS+ filesystems ? I vaguely recall that the OS X version is "hacked" to handle the file semantics of HFS+ filesystems. Hopefully someone else actually knows the details, I could be a bit wrong here, but IIRC it's something like : On a "*nix" filsystem, a file is a file - a chunk of data and some filesystem metadata. On HFS+, a file is comprised of up to 3 parts - the data fork, the resource fork (I don't believe this is widely used these days), and a chunk more metadata. "Regular" rsync only copies the data fork and that part of the metadata that maps to *nix filesystem semantics, the OS X version of rsync copies the whole file by way of quite a kludge - can't remember if it needs an extra cmd line switch to do this. The kludge is to treat the data fork as one file, and the resource fork plus metadata as another file. I vaguely recall that this means it does something like : 1) copy/sync data fork as one file 2) copy/sync resource fork as another file - put the bits together at the destination >From memory (it's a while since I last used rsync for doing backups), in step >1 the files don't match because the destination file was modified during step >2 of the last copy - thus the file gets synced again. Again from memory, I >think I used to see that every file with a resource fork would be copied in >it's entirety every time. This could be a complete red herring of course, but it's something I've come across in the past/ -- 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
Re: rsync keeps writing files over
per...@pluto.rain.com (Perry Hutchison) wrote: > Best choice for magtape is probably something like tar, cpio, or pax > (for a file-oriented backup), or the appropriate variant of dump(8) > (to back up an entire filesystem -- but not all FS formats have a > dump/restore suite available). I wouldn't have thought rsync a good choice either. I've used both tar and cpio in the past - I don't think there's much to choose between them, "personal comfort" with the tool is probably as big a factor as anything. Used them with QIC, DAT, DLT, and SLR over the years. If you want "ease of use" and aren't averse to paid for/proprietary programs, then on a Mac I think Retrospect has a lot going for it. I've been using it for home and business use for something like 25 years - oh, that makes me feel old now ! It's exceedingly good for incremental/differential backups - I've tried a few others but always managed to find situations where they would miss copying files (not a good attribute for a backup system), an area Dantz has some patents on. -- 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
Re: Delete remote folder
At 10:27 02.06.2016, Fabian Cenedese wrote: >Content-Transfer-Encoding: 7bit > >Hi > >I'm trying to build a backup system based on rsync. It should >work with different destinations (local, share, remote etc) that's >why I'm looking for ways how every operation can be controlled >from the client side. > >I want to create full backups and incremental backups. For the >incremental backups I use --compare-dest lastfullbackup. This >works nicely except that the whole directory tree is created >even if no files are copied. This is mentioned several times >on the Internet and the usual answer is that there's no way >around it because of the way that rsync works. I don't mind >that they are created if there's a (rsync-)way to delete them >again afterwards, something like > >rsync -a --delete --prune-empty-dirs dest dest > >Unfortunately at least one place has to be local, doing a >remote-remote is not possible. So far I haven't found a solution to this problem. I've now seen this release note for the last version 3.1.2: - Don't create an empty backup dir for a transferred file that doesn't exist yet. I'm wondering now if that would help in my case with --compare-dest. But I don't have it compiled for Windows. Can anybody confirm if the newest rsync does not create empty folders anymore? Thanks bye Fabi -- 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
[Bug 11949] New: A malicious sender can still use symlinks to overwrite files
https://bugzilla.samba.org/show_bug.cgi?id=11949 Bug ID: 11949 Summary: A malicious sender can still use symlinks to overwrite files Product: rsync Version: 3.1.2 Hardware: All OS: All Status: NEW Severity: normal Priority: P5 Component: core Assignee: way...@samba.org Reporter: vci...@suse.com QA Contact: rsync...@samba.org Commit 962f8b90045ab331fc04c9e65f80f1a53e68243b fixed an issue where malicious servers can utilize a just sent symlink to overwrite arbitrary files (CVE-2014-9512). The check was implemented for the inc-recurse algorithm only. An evil sender can bypass the check and still use the symlink vector by negotiating protocol < 30. You might consider fixing this in the non-incremental recursive algorithm as well. -- 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