Novell Home

Using Rsync Outside of NBO

Novell Cool Solutions: Tip

Digg This - Slashdot This

Posted: 23 Nov 2004

Thanks to Cool Solutions reader Gary Childers for sending us this tip on using RSYNC outside of Nterprise Branch Office. Note that Novell supports their implementation of Rsync code only when the source server is a Novell Branch Office Server.

I am using this approach for a data backup solution, so that I no longer have to perform tape backups at remote office locations. The data is copied daily using Rsync from a remote server to a central office server, which is then centrally backed up to tape.

My Central Office server runs NetWare 6.5 with the Rsync component installed. My remote office server has Rsync v.2.6.2, downloaded from the Novell developer site. The server runs a syncusrs.ncf file (scheduled to run daily via Remote Manager) to push its data to the RSYNC server:

rsync -rav --volume=DATA: users/ RSYNC1::USERS --delete --exclude-from=SYS:rsync/excludes.txt

This mirrors the DATA:\USERS directory from the REMOTE server to the specified path on the Rsync server.

Rsync Options

  • -rav means -r for recursive, -a for archive, -v for verbose.
  • The source string is "--volume=DATA: users/" (note the trailing "/").
  • The destination string is "RSYNC1::REMOTEUSERS" (the server name can be resolved via the HOSTS file, and the REMOTEUSERS corresponds to the section specified in the rsyncd.conf file on the RSYNC server). The double-colon "::" specifies that rsync communication will occur via TCP, default port 873.
  • The -- delete switch deletes files on the target that have been deleted on the source (use carefully).
  • The --exclude-from switch will exclude copying files that are listed in the specified text file (like, *.mp3).

See the Rsync man pages for a full list of Rsync options (Google Rsync man page).

Rsync Procedures

Since Rsync does not save the NetWare attributes on the files, I run trustusers.ncf with the following line, one minute before the Rsync:


Then the trustees.txt file gets synced with the data. If I have to restore, I can also later restore all the NetWare permissions. TRUSTEE.nlm can be downloaded from the Novell site. In the event that I want to perform a full data restore of the entire USERS directory, I can pull data back from the RSYNC server to the source server with a restusrs.ncf file:

rsync -rav RSYNC1::USERS --volume=DATA: users --update

This will restore any files deleted since the last backup, by reversing the source and target strings. The --update switch will ensure that any files modified since the last backup will not be overwritten.

This is a "brute force" restore, I realize. If used, it would also restore deleted files in subdirectories that weren't meant to be restored. If I need to perform a more selective restore of data, say, down to the directory level, I can execute the following command on the REMOTE server:

rsync -rav RSYNC1::REMOTEUSERS/admin/foo/bar/ --volume=DATA: users/admin/foo/bar --update

This will restore all files in the data:/users/admin/foo/bar directory, while preserving any that were updated since the last backup (Rsync). The trailing "/" in the source string is important - it designates all files/folders in that directory, rather than the directory itself.


My RSYNC server has this section in the rsyncd.conf file:

  path = DATA:/rsync/REMOTE/USERS
  comment = USERS backup area for REMOTE server
  read only = no
  use chroot = no 
  timeout = 3600
  transfer logging = yes
  use lfs=yes
  hosts allow=
  hosts deny=*

(This is easily configured from Remote Manager on the RSYSNC server.)

My remote server has the excludes.txt file to exclude certain file types from the transfer:


Novell Cool Solutions (corporate web communities) are produced by WebWise Solutions.

© 2014 Novell