In the following example, backupconfigs is run. backupconfigs fetches common Solaris system config files from a customisable list inside the script, or from a textfile list. These are sent to a tar file with the name "hostname.date.tar", with the directory "hostname.date/" prepended to every file (makes expansion easy). Normally the scipt prints no output (for crontabs), however "-v" is used here for verbose output. A directory "/var/backups" is also specified, so that the tar file is sent there (normally uses the current directory). This script will run on other OS's with few changes. # ./backupconfigs -vd /var/backups Creating file: /var/backups/mars.20030121.tar a mars.20030121/ 0K a mars.20030121/etc/ 0K a mars.20030121/etc/passwd 2K a mars.20030121/etc/system 2K a mars.20030121/etc/vfstab 1K a mars.20030121/etc/inet/ 0K a mars.20030121/etc/inet/hosts 3K a mars.20030121/etc/inet/inetd.conf 7K a mars.20030121/etc/nodename 1K a mars.20030121/etc/coreadm.conf 1K a mars.20030121/etc/dacf.conf 2K a mars.20030121/etc/dumpadm.conf 1K a mars.20030121/etc/inetd.conf symbolic link to ./inet/inetd.conf a mars.20030121/etc/logadm.conf 2K a mars.20030121/etc/named.conf 1K a mars.20030121/etc/nfssec.conf 1K a mars.20030121/etc/nscd.conf 2K a mars.20030121/etc/nsswitch.conf 1K a mars.20030121/etc/pam.conf 3K a mars.20030121/etc/power.conf 1K a mars.20030121/etc/printers.conf 1K a mars.20030121/etc/resolv.conf 1K a mars.20030121/etc/rmmount.conf 1K a mars.20030121/etc/rpld.conf 1K a mars.20030121/etc/syslog.conf 2K a mars.20030121/etc/vold.conf 1K a mars.20030121/etc/dfs/ 0K a mars.20030121/etc/dfs/dfstab 1K a mars.20030121/etc/dfs/fstypes 1K a mars.20030121/etc/dfs/sharetab 0K a mars.20030121/etc/ssh/ 0K a mars.20030121/etc/ssh/sshd_config 5K a mars.20030121/etc/ssh/ssh_config 1K a mars.20030121/etc/ssh/ssh_host_rsa_key.pub 1K a mars.20030121/etc/ssh/ssh_host_dsa_key.pub 1K a mars.20030121/etc/mail/ 0K a mars.20030121/etc/mail/aliases 2K a mars.20030121/etc/defaultdomain 1K a mars.20030121/etc/default/ 0K a mars.20030121/etc/default/login 2K a mars.20030121/var/ 0K a mars.20030121/var/spool/ 0K a mars.20030121/var/spool/cron/ 0K a mars.20030121/var/spool/cron/atjobs/ 0K a mars.20030121/var/spool/cron/crontabs/ 0K a mars.20030121/opt/ 0K a mars.20030121/opt/sfw/ 0K a mars.20030121/opt/sfw/squid/ 0K a mars.20030121/opt/sfw/squid/etc/ 0K a mars.20030121/opt/sfw/squid/etc/squid.conf 90K File: /var/backups/mars.20030121.tar created. -rw------- 1 root other 163840 Jan 21 00:35 mars.20030121.tar #