SUMMARY: rdist

From: Mariel Feder (unix.support@central.meralco.com.ph)
Date: Tue Jul 15 1997 - 20:09:31 CDT


Original question:

> Is anybody using rdist?
> Can you send me a distfile? because I can not thoroughly understand
> its syntaxis.
> Thanks in advance,
> mariel

Many thanks to this fellows, who answered the following:

Jerry Hagon:

I use rdist to mirror a filesystem (/u) on a machine called bragg.
The filesystem is mirrored on a remote machine called landau with
directory name /export/users. Here is the disfile:

HOSTS = ( root@landau.ncl.ac.uk)

FILES = ( /u )

${FILES} -> ${HOSTS}
        install -oremove /export/users ;

${FILES} :: stamp.landau
        notify njph@bragg.ncl.ac.uk ;

************************************************************************

Ann Rautenbach:

There's an excellent tutorial available on the internet, which helped
me set up rdist.

http://iworks.ecn.uiowa.edu/conference/IWorks96/sessions/RDIST.html

************************************************************************

Gautam Das:

HOSTS = ( host1
          host2
          host3
        )
 
FILES = ( /usr/bin/X11/netscape
          /usr/local/lib/netscape/moz2_0.zip
        )
 
${FILES} -> ${HOSTS}
        

You should read the manual page on rdist. If you don't you will regret
later. Rdist is a very powerful tool and must be used with full
understanding.

***********************************************************************

Stephen P Richards:

simple one:
#
# cp /opt/local on HostA to HostB
# ( run from HostA )
#

(/opt/local) -> (HostB)
        install -R -w -y /;
        notify spr@HostA;

# except /pathname;

# comment

===================================================================
another longer, but still simple one

#
# This copies files on HostA's root partition to another disk also
# mounted on HostA - this creates a copy of root that can be
# used in the event of failure of the primary root partition.
#
# fsck secondary root disk partitions
# mount secondary root disk (on /2nd_root)
#
#
# root_sync package
# files to keep synchronized between primary and secondary
# boot disk.
#

root_sync:

(/) -> (HostA)
install -R -w -y /2nd_root;

# files that are updated on each boot
        except //etc/cron.d/FIFO;
        except //etc/dfs/sharetab;
        except //etc/saf/zsmon/_pmpipe;
        except //etc/saf/zsmon/_pid;
        except //etc/saf/_sacpipe;
        except //etc/saf/_cmdpipe;
        except //etc/mnttab;
        except //etc/.mnttab.lock;
        except //etc/syslog.pid;
        except //etc/utmppipe;
        except //etc/initpipe;
        except //etc/rmtab;
        except //.ab_library.lock;
        except //.sh_history;

# swapfiles

# directories that should not be replicated
        except //dev;
        except //devices;
        except //lost+found;
        except //2nd_root;
        except //.fm; #used by filemanager

# mountpoints for other filesystems
        except //tmp;
        except //proc;
        except //cdrom;
        except //cdrom1;
        except //var;
        except //mnt;
        except //pcfs;
        except //floppy;
        except //export;
        except //vol;

# mountpoints used by automount
        except //net;
        except //opt;
        except //home;
        except //files;

# ---------------------------
# maybe add warnings for these:
# /dev
# /devices

***********************************************************************

David Foster:

f you get "version mismatch" error messages, chances are you have 'stty'
commands in your startup files that don't have an associated terminal
device when running rdist (hence the error messages). Put such commands
as such:

if ( $?prompt ) then # Only when interactive shell
        stty -istrip
        stty erase ^h
        stty kill ^u
        set history=32
endif

Also, make sure you have any references to variables like $TERM put in
a conditional statement like above, since these variables won't be
defined when using rdist (or rsh for that matter).

Hope this helps.

Dave

# distfile
#
# Distribution file for rdist command for
# directory /export/home/foster/Cdev/pmo_utils.
#
# [ "version mismatch" error messages arose from 'stty' commands
# in the startup files, as well as a reference to $TERM, which
# is undefined in the remote shell started by rsh ]

HOSTS = ( root@bial5 root@bial6 root@bial7 root@bial8 )

FILES = ( /opt/local/util/bin/backup_optical )

(${FILES}) -> (${HOSTS})
        install -b;

************************************************************************



This archive was generated by hypermail 2.1.2 : Fri Sep 28 2001 - 23:11:58 CDT