Syntax

tim.conway at philips.com tim.conway at philips.com
Thu Jun 6 08:30:02 EST 2002


I would start with rsync.1
Your command:
"rsync -cazv 192.168.1.2/home/user *   192.168.1.4/home/user/backup"
means to sync the directory 192.168.1.2/home/user in the current directory, and everything in your 
home directory, into the directory 192.168.1.4/home/user/backup, also in 
the current directory, using checksums on every item,recursively, 
preserving symlinks, user, group, permission, and times, using compression 
(which is ignored since it's a local-only sync), and showing everything 
it's doing.
I think your intention was to sync the contents of /home/user on 192.168.1.2 and of the current directory, into /home/user/backup on 92.168.1.4, which is also an error.  If the destination is remote, all 
sources must be local.  If any source is remote, the destination must be 
local.  The phrase "Note that in all cases (other than listing) at least one  of  the source 
and destination paths must be local." is easily misinterpred as requiring 
that including something local in the source  list will satisfy the 
syntax.  Also, unless you want to put everything you're getting from 192.168.1.2 into 192.168.1.4:/home/user/backup/user, you should add a / to the end of 192.168.1.2:/home/user.  Then, to make the remote paths remote, put a colon between the address 
and the path.
To get 192.168.1.2:/home/user to 192.168.1.4:/home/user/backup, you'll have to run rsync from one of the other of them. or sync 192.168.1.2:/home/user to a local directory temporarily, then from there to 192.168.1.4:/home/user/backup.  The relevant section of the manual is 
below.
+++++++++++++++++++++++++++++++++++++++++
GENERAL
     There are six different ways of using rsync. They are:

SunOS 5.7           Last change: 25 Jan 2002                    1

User Commands                                            rsync(1)

     o    for copying local files. This is invoked  when  neither
          source nor destination path contains a : separator

     o    for copying from the local machine to a remote  machine
          using  a remote shell program as the transport (such as
          rsh or ssh). This is invoked when the destination  path
          contains a single : separator.

     o    for copying from a remote machine to the local  machine
          using  a remote shell program. This is invoked when the
          source contains a : separator.

     o    for copying from a remote rsync  server  to  the  local
          machine.  This is invoked when the source path contains
          a ::  separator or a rsync:// URL.

     o    for copying from the local machine to  a  remote  rsync
          server.  This is invoked when the destination path con-
          tains a ::  separator.

     o    for listing files on a remote machine. This is done the
          same  way  as rsync transfers except that you leave off
          the local destination.

     Note that in all cases (other than listing) at least one  of
     the source and destination paths must be local.
+++++++++++++++++++++++++++++++++++++++++
You may also want to drop the -c option.  That's only needed if you are 
syncing files while you're changing them, accessing them from multiple 
machines with the clocks badly out of sync, changing system time 
willy-nilly, or other circumstances that invalidate the timestamp.  It 
adds a lot of cpu and I/O overhead.

Tim Conway
tim.conway at philips.com
303.682.4917
Philips Semiconductor - Longmont TC
1880 Industrial Circle, Suite D
Longmont, CO 80501
Available via SameTime Connect within Philips, n9hmg on AIM
perl -e 'print pack(nnnnnnnnnnnn, 
19061,29556,8289,28271,29800,25970,8304,25970,27680,26721,25451,25970), 
".\n" '
"There are some who call me.... Tim?"




Richard Ibbotson <richard at sheflug.co.uk>
Sent by: rsync-admin at lists.samba.org
06/06/2002 07:35 AM

 
        To:     rsync at lists.samba.org
        cc:     (bcc: Tim Conway/LMT/SC/PHILIPS)
        Subject:        Syntax
        Classification: 



Hi

Wonder if anyone can help ?

My own internal domestic server was running fine with most things 
until I re-installed today.  Rsync config was done by someone else 
who knows what to do.  I don't.  Seems like a good time to learn :)

I'm trying to backup the contents of my home directory to another 
internal machine which is at 192.168.1.4 from my home directory which 
is at 192.168.1.2.   What are the correct syntax to use ?  I've read 
the man page and can't understand any of it.  So, I was hoping to get 
some help...

I've tried something like...

rsync -cazv 192.168.1.2/home/user *   192.168.1.4/home/user/backup

but this doesn't work even when I make a folder on the other machine 
which is 'backup'.

So, what to do next ?

Thanks


-- 
Richard


www.sheflug.co.uk

-- 
To unsubscribe or change options: 
http://lists.samba.org/mailman/listinfo/rsync
Before posting, read: http://www.tuxedo.org/~esr/faqs/smart-questions.html







More information about the rsync mailing list