Re: --delete - Tools

This is a discussion on Re: --delete - Tools ; On Thu, 2008-10-02 at 20:59 -0400, Franck Y wrote: > Is there anyway to move the deleted files/folder to another place ? > I have googled a little bit but nothing comes out. It's the --backup-dir option. If you want ...

+ Reply to Thread
Results 1 to 5 of 5

Thread: Re: --delete

  1. Re: --delete

    On Thu, 2008-10-02 at 20:59 -0400, Franck Y wrote:
    > Is there anyway to move the deleted files/folder to another place ?
    > I have googled a little bit but nothing comes out.


    It's the --backup-dir option. If you want to treat deleted files
    differently from overwritten ones, use this patch:

    http://rsync.samba.org/ftp/rsync/pat...-dir-dels.diff

    Matt

    --
    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


  2. Re: --delete




    On 2-Oct-08, at 21:01, Matt McCutchen wrote:

    > On Thu, 2008-10-02 at 20:59 -0400, Franck Y wrote:
    >> Is there anyway to move the deleted files/folder to another place ?
    >> I have googled a little bit but nothing comes out.

    >
    > It's the --backup-dir option. If you want to treat deleted files
    > differently from overwritten ones, use this patch:
    >
    > http://rsync.samba.org/ftp/rsync/pat...-dir-dels.diff
    >
    > Matt
    >

    Thanks matt.
    Will it create the same directory tree (structure) ?
    --
    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


  3. Re: --delete

    On Thu, 2008-10-02 at 21:28 -0400, Franck Yelles wrote:
    > On 2-Oct-08, at 21:01, Matt McCutchen wrote:
    > > On Thu, 2008-10-02 at 20:59 -0400, Franck Y wrote:
    > >> Is there anyway to move the deleted files/folder to another place ?
    > >> I have googled a little bit but nothing comes out.

    > >
    > > It's the --backup-dir option. If you want to treat deleted files
    > > differently from overwritten ones, use this patch:
    > >
    > > http://rsync.samba.org/ftp/rsync/pat...-dir-dels.diff

    >
    > Thanks matt.
    > Will it create the same directory tree (structure) ?


    Yes. Rsync will move each deleted or overwritten destination file to
    the same path under the backup dir as it was at under the destination,
    creating ancestor directories as necessary.

    Matt

    --
    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


  4. Re: --delete

    On Sun, 2008-10-05 at 01:03 -0400, Franck Y wrote:
    > Quick Question i will have to download the source [to use a backup
    > dir] ?
    >
    > It is already running on my system ? I have installed though a rpm ?


    Your RPM-installed rsync should support the --backup-dir option out of
    the box. You only need to get the source and rebuild rsync if you want
    the --backup-dir-dels option, which lets you treat deleted files
    differently from overwritten ones.

    Matt

    --
    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


  5. Re: --delete

    On Mon, 2008-10-13 at 23:20 -0400, Franck Y wrote:
    > I got the source and rebuild it since i needed the --backup-dir-dels
    > option.
    >
    > I sucesfully compiled it within my remote and my host.
    >
    > I have a little script that is working so i added the
    > --backup-dir-dels
    >
    > rsync --owner --group --compress --size-only --stats
    > --backup-dir-dels=/back_delete --progress --recursive --times
    > --exclude '*.tmp' --perms --links 192.168.10.69::all_data /data2/ |
    > tee $name_of_log.
    >
    > I remove a file from the remote and a directory as well but
    > unfortunately i saw nothing in /back_delete, i tried
    > --backup-dir-dels=/back_delete and --backup-dir-dels='/back_delete'
    > but with no luck !


    You need to use the --delete and --backup options along with
    --backup-dir-dels. You may also need to set a --backup-dir to give
    rsync a place to put overwritten files; otherwise it will default to
    appending a ~ to the name.

    Matt

    --
    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 to Thread