[prev in list] [next in list] [prev in thread] [next in thread] 

List:       rsync
Subject:    Re: rsync, trailing slash, and --delete
From:       BJ Quinn <bjquinn () seidal ! com>
Date:       2011-08-11 20:20:10
Message-ID: d869e3de-8036-4d50-b721-61ffa851d08d () mail2
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


Thanks for the response. I tried a few simple tests myself and it does indeed appear \
to work. Seems like a few years ago I was able to reproduce the behavior described at \
http://defindit.com/readme_files/rsync_backup.html which says that if you use a \
trailing slash then --delete won't delete top-level directories. Maybe it's been \
fixed with newer rsync's, or maybe I was confused all along? Either way, it appears \
to work. 

-BJ Quinn 

----- Original Message -----

From: "Kevin Korb" <kmk@sanitarium.net> 
To: rsync@lists.samba.org 
Sent: Thursday, August 11, 2011 2:14:53 PM 
Subject: Re: rsync, trailing slash, and --delete 

-----BEGIN PGP SIGNED MESSAGE----- 
Hash: SHA1 

delete will still work. 

On 08/11/11 15:06, BJ Quinn wrote: 
> I'm trying to rsync a folder like so - 
> 
> rsync -aP --delete /home/share_20110801 /lastbackup/share 
> 
> Under the /lastbackup folder there is a "share" folder. I'd like to 
> rsync all the contents of the "share _20110801" folder directly under 
> the the "share" folder under /lastbackup. I know I can add the trailing 
> slash to the source directory to accomplish this, but then as I 
> understand it --delete won't work in that top-level directories deleted 
> in the source won't be deleted in the destination. Is there any way to 
> rsync from a folder to a differently named folder without breaking --delete? 
> 
> Thanks! 
> 
> -BJ Quinn 
> 

- -- 
~*-,._.,-*~'`^`'~*-,._.,-*~'`^`'~*-,._.,-*~'`^`'~*-,._.,-*~'`^`'~*-,._.,-*~ 
Kevin Korb Phone: (407) 252-6853 
Systems Administrator Internet: 
FutureQuest, Inc. Kevin@FutureQuest.net (work) 
Orlando, Florida kmk@sanitarium.net (personal) 
Web page: http://www.sanitarium.net/ 
PGP public key available on web site. 
~*-,._.,-*~'`^`'~*-,._.,-*~'`^`'~*-,._.,-*~'`^`'~*-,._.,-*~'`^`'~*-,._.,-*~ 
-----BEGIN PGP SIGNATURE----- 
Version: GnuPG v2.0.17 (GNU/Linux) 

iEYEARECAAYFAk5EKiwACgkQVKC1jlbQAQfYugCeKmQDv/DCVCq/ScGsfQZYqq/L 
SqAAmwRq4TvotRI0bP8Dwm6KSfNLtt3Y 
=Yv5o 
-----END PGP SIGNATURE----- 
-- 
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 


[Attachment #5 (text/html)]

<html><head><style type='text/css'>p { margin: 0; }</style></head><body><div \
style='font-family: Times New Roman; font-size: 12pt; color: #000000'>Thanks for the \
response.&nbsp; I tried a few simple tests myself and it does indeed appear to \
work.&nbsp; Seems like a few years ago I was able to reproduce the behavior described \
at http://defindit.com/readme_files/rsync_backup.html which says that if you use a \
trailing slash then --delete won't delete top-level directories.&nbsp; Maybe it's \
been fixed with newer rsync's, or maybe I was confused all along?&nbsp; Either way, \
it appears to work.<br><br>-BJ Quinn<br><br><hr id="zwchr"><div \
style="color:#000;font-weight:normal;font-style:normal;text-decoration:none;font-family:Helvetica,Arial,sans-serif;font-size:12pt;"><b>From: \
</b>"Kevin Korb" &lt;kmk@sanitarium.net&gt;<br><b>To: \
</b>rsync@lists.samba.org<br><b>Sent: </b>Thursday, August 11, 2011 2:14:53 \
PM<br><b>Subject: </b>Re: rsync, trailing slash, and --delete<br><br>-----BEGIN PGP \
SIGNED MESSAGE-----<br>Hash: SHA1<br><br>delete will still work.<br><br>On 08/11/11 \
15:06, BJ Quinn wrote:<br>&gt; I'm trying to rsync a folder like so -<br>&gt; \
<br>&gt; rsync -aP --delete /home/share_20110801 /lastbackup/share<br>&gt; <br>&gt; \
Under the /lastbackup folder there is a "share" folder. &nbsp;I'd like to<br>&gt; \
rsync all the contents of the "share _20110801" folder directly under<br>&gt; the the \
"share" folder under /lastbackup. &nbsp;I know I can add the trailing<br>&gt; slash \
to the source directory to accomplish this, but then as I<br>&gt; understand it \
--delete won't work in that top-level directories deleted<br>&gt; in the source won't \
be deleted in the destination. &nbsp;Is there any way to<br>&gt; rsync from a folder \
to a differently named folder without breaking --delete?<br>&gt; <br>&gt; \
Thanks!<br>&gt; <br>&gt; -BJ Quinn<br>&gt; <br><br>- -- \
<br>~*-,._.,-*~'`^`'~*-,._.,-*~'`^`'~*-,._.,-*~'`^`'~*-,._.,-*~'`^`'~*-,._.,-*~<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Kevin \
Korb&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Phone: \
&nbsp; &nbsp;(407) 252-6853<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Systems \
Administrator&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;& \
nbsp;&nbsp;&nbsp;&nbsp;Internet:<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;FutureQuest, \
Inc.&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Kevin@FutureQuest.net \
&nbsp;(work)<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Orlando, \
Florida&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;kmk@sanitarium.net \
(personal)<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Web \
page:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nb \
sp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;http://www.sanitarium.net/<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;PGP \
public key available on web \
site.<br>~*-,._.,-*~'`^`'~*-,._.,-*~'`^`'~*-,._.,-*~'`^`'~*-,._.,-*~'`^`'~*-,._.,-*~<br>-----BEGIN \
PGP SIGNATURE-----<br>Version: GnuPG v2.0.17 \
(GNU/Linux)<br><br>iEYEARECAAYFAk5EKiwACgkQVKC1jlbQAQfYugCeKmQDv/DCVCq/ScGsfQZYqq/L<br>SqAAmwRq4TvotRI0bP8Dwm6KSfNLtt3Y<br>=Yv5o<br>-----END \
PGP SIGNATURE-----<br>-- <br>Please use reply-all for most replies to avoid omitting \
the mailing list.<br>To unsubscribe or change options: \
https://lists.samba.org/mailman/listinfo/rsync<br>Before posting, read: \
http://www.catb.org/~esr/faqs/smart-questions.html<br></div><br></div></body></html>



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

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic