Technical article 127036

How can I download, install and run "rsync" with SCO Unix?

OpenServer 6.0.0OpenServer 5.0.7UnixWare 7.1.4

Written · Last revised

Problem

I would like to use "rsync" with SCO Unix but it is not provided as part of the product nor is it supported as an open source component.

However, is it possible to compile "rsync" from source?

Solution

SCO OpenServer 6.0.0
--------------------
This product is already provided with SCO Skunkware, available from:
ftp://ftp2.sco.com/pub/skunkware/osr6/vols/rsync-3.0.2Sa-VOLS.cpio

It is installed by extracting the VOLume images from the "cpio" file and pointing "custom", when installing new software, to where these VOLume images reside.

Once installed, go to the "How to use" section below.

SCO UnixWare 7.1.4:
------------------
This product is already provided with SCO Skunkware, available from:
ftp://ftp2.sco.com/pub/skunkware/uw7/Packages/rsync-3.0.2.pkg
It is installed using pkgadd:
pkgsdd -d /tmp/rsync-3.0.2.pkg

Once installed, go to the "How to use" section below.

SCO OpenServer 5.0.7:
--------------------
You have to compile rsync with the SCO Development System.

You must have the SCO OpenServer5 Development System (DevSys) installed and licensed on your system before you can build rsync from source.

To Compile:
----------
Download the latest sources for rsync from:
http://samba.org/ftp/rsync/src/

At the time of this writing it was 3.0.2.

So download rsync-3.0.2.tar.gz into a directory - for example:

/local/rsync
Run, assuming, "gunzip" is installed:
# gunzip /local/rsync/rsync-3.0.2.tar.gz
# tar xvf /local/rsync/rsync-3.0.2.tar
Now "cd" to:
# cd /local/rsync/rsync-3.0.2
and run:
# ./configure

This will perform a couple of checks and should end with rsync 3.0.2 configuration successful.

Now run:
# make
This will create the binary rsync.
To install:
----------
Now you can either copy rsync to /usr/bin/ or you can run:
# make install

This will copy rsync to /usr/local/bin/ and the man pages to /usr/local/share/man.

Please make sure that /usr/local/bin is in your $PATH.

To be able to read the man pages please add /usr/local/share/man to MANPATH in /etc/default/man or use the command:

# man -d /usr/local/share/man rsync
How To Use:
----------
First, make sure 'rsync' is in /usr/bin or, at least, is linked to
to location of the 'rsync' binary, eg:
# ln /usr/local/bin/rsync /usr/bin/rsync

otherwise you may see "rsync not found" error after attempting to run it.

Now, let's start with some basic examples:

Run:
# rsync -avv /local/rsync <other server>:/tmp

This will recursively copy the directory /local/rsync from your SCO Unix system to the <other server> and create a directory:

/tmp/local/rsync

<other server> may be another Unixware or OpenServer system or any flavour running 'rsync'.

The -a options means:
-a, --archive               archive mode; equals -rlptgoD
ie:
-r, --recursive             recurse into directories
-l, --links                 copy symlinks as symlinks
-p, --perms                 preserve permissions
-t, --times                 preserve modification times
-g, --group                 preserve group
-o, --owner                 preserve owner (super-user only)
-D                          same as --devices --specials

The -vv options means verbose and list the files affected.

-v is verbose -vv verbose and list files -vvv debugging

Additional options are:

-b = backup. If a file with this name already exists then it will be renamed as <file>~

-z = compression. Same as gzip.  This will slow the server down as
     it will need to compress each file before sending and uncompress
     on the other side but will reduce network traffic.

You will notice that by default 'ssl' transport is used and you will be prompted for a password.

To use 'ssl' without being prompted for a password, see TA116826

or use the --password-file or RSYNC_PASSWORD env variable option which will require you to run rsync in background as:

# rsync --daemon

A further example to 'sync' two directories would be to use the 'delete' option, eg:

# rsync -bazv --delete /local/rsync <other server>:/tmp

Take care as this will, likely, delete files on the recipient/target side as the files are 'sync'ed.

It is recommended to use the "--delete-after" rather than just
"--delete" so that once a file is copied over/sync'ed then the
original file is deleted.   Please note though that each file is
always copied to a .<filename> first during the transfer so this is
likely to increase disk usage.
NOTES:    Frequently Asked Questions:
Q1.  Is 'rsync' officially supported by SCO?
A1.  Unfortunately it is not included or is officially supported by
     SCO.
Q2.  Where do I go to find out about supported products from SCO?
A2.  TA125883, "How can I copy files from one server to another?"
Q3.  Can I set up 'rsync' so it doesn't ask me for a password each
     time I connect to another server?
A3.  TA116826, "How do I set up a remote shell with SSH so that I'm
     not prompted for a password each time I login using ssh?"
Q4.  Can I copy multiple files in one line with 'rsync'?
A4.  Yes, in the format:
# rsync -options /data1 /data2 <dest>
Q5.  Is there any documentation which describes rsync in more detail?
A5.  Yes, see TA127120, "How to get started with rsync"
Q6.  --delete-before and --delete don't delete the file first.
     What's wrong?
A6.  The option copies the file first to the target server to a .dot
     file, once the copy is complete, deletes the original file then
     copies the new file over.
Q7.  I'm running out of disk space, how can this happen?

A7. See Q6 above. If you are copying, for example, a 2GB file then first a .dot file is created during the copy, therefore, causing 4GB of disk space to be consumed, and then the file is deleted and replaced with the copied file.

For large files like this, it is recommended to 'exclude' them from the 'rsync' and use 'cpio' or 'scp' to copy over the files.

Q8.  Will 'rsync' copy over just the changes to a particular file.
A8.  Use of the --inplace option can be used if the file has been
     changed.  However, care should be taken to ensure the integrity
     of the file on the target server.  This will not require large
     amounts of disk space as only the changes are copied over but
     will add to the processing time.
Q9.  Is there a way to gather stats or check progress?
A9.  Use the --status and --progress options.

Q10. What is the recommended command line to sync two folders?

A10. # rsync -avv --stats --delete-before [source] [target]:[DEST]
eg, where source and target/DEST are:
/data/share backup_server:/data

See also

TA#125883, "How can I copy files from one server to another?"

http://samba.anu.edu.au/ftp/rsync/rsync.html

From the Xinuos technical article database, record 127036. Reproduced with permission. The original is at www.sco.com/ta/127036, which is reachable but blocked from search engines.

Next step

Need this fixed rather than explained?

Tell us the release, what the system runs and what it is doing. We will reply by email with what we would do next.

  • You deal with the people who do the work
  • No obligation, and no upgrade required before we will help
  • We tell you plainly if something is not worth doing

Send an enquiry

We reply by email. If a server is down, say so in the first line. You can also write to help@scoexpert.com.