Re: How use rsync to make source and target identical again
- From: Christian <christian.m.eriksson@xxxxxxxxx>
- Date: Tue, 26 Jul 2011 07:16:33 -0700 (PDT)
Yes, I used the -p option to scp. I have actually run rsync to try to
accomplish what I'm asking for in this thread:
[root@ska824 ~]# rsync -arv --delete --ignore-existing -te 'ssh -c
arcfour' mxftp@xxxxxxxxxxxxxxxxxx:/data/stores/ /data/stores/
I'm starting to think about this "--ignore-existing" option. Can this
make me end up with older versions of files on target than on source?
It's about a month ago since I ran this command, before my vacation,
so I can't really tell why I used this option "--ignore-existing",
maybe I don't need it. (Maybe I thought this was the only way to avoid
copying identical files between source and target.)
Regards Christian
On 26 Juli, 10:28, Eef Hartman <E.J.M.Hart...@xxxxxxxxxx> wrote:
Christian <christian.m.eriks...@xxxxxxxxx> wrote:
I have earlier copied source to target with scp.
Did you use scp with the -p option to preserve date/time ??
How should I run rsync to accomplish that without copying
already identical files between source ant target? (There may be files
added on target that don't exist on source and those files I want
deleted.)
Normally rsync checks on date/time and size, if those are identical
it won't copy it again.
If the date/time is NOT identical you will have to check contents,
which will make it MUCH slower:
-a (optional -H for "hard links", -S for "sparse files")
will make an "archive" copy, based on date/time and size, add
-c (check on checksum, not data-time)
if the copies do NOT already have the same date/time.
Example: I want to sync directory "data" _and_ all of its contents
to remote machine backup, under directory mirror:
rsync -a data backup:mirror
for a date/time based sync (note: NO trailing / on source "data"
means dat "data" will become a subdir of "mirror").
Add -H, -S and/or -c options as needed, -a will handle most other
attributes, but these are optional (-H when you want to preserve
HARD links in the copied files, -S when you want to keep sparse
files AS sparse files).
See also the man page for rsync
--
******************************************************************
** Eef Hartman, Delft University of Technology, dept. SSC/ICT **
** e-mail: E.J.M.Hart...@xxxxxxxxxx - phone: +31-15-27 82525 **
******************************************************************
.
- Follow-Ups:
- Re: How use rsync to make source and target identical again
- From: Eef Hartman
- Re: How use rsync to make source and target identical again
- From: Christian
- Re: How use rsync to make source and target identical again
- From: Christian
- Re: How use rsync to make source and target identical again
- References:
- How use rsync to make source and target identical again
- From: Christian
- Re: How use rsync to make source and target identical again
- From: Eef Hartman
- How use rsync to make source and target identical again
- Prev by Date: Re: How use rsync to make source and target identical again
- Next by Date: Re: How use rsync to make source and target identical again
- Previous by thread: Re: How use rsync to make source and target identical again
- Next by thread: Re: How use rsync to make source and target identical again
- Index(es):
Relevant Pages
|