# Copyright 2000 - 2004 George Shaffer # Anyone may use or modify this code for any purpose PROVIDED # that as long as it is recognizably derived from this code, # that this copyright notice, remains intact and unchanged. # No warrantees of any kind are expressed or implied. # Most of the time tar is run with the -r, append, option but the # tar file must first be created before this can be used. Any small # file in a known location will do hence /etc/shells. cd /var/local/backup tar -cvf backup /etc/shells >backup.log /usr/bin/find /bin -type f -newer /etc/installed -exec tar -rvf backup {} \; >>backup.log /usr/bin/find /etc -type f -newer /etc/installed -exec tar -rvf backup {} \; >>backup.log /usr/bin/find /home -type f -newer /etc/installed -exec tar -rvf backup {} \; >>backup.log /usr/bin/find /lib -type f -newer /etc/installed -exec tar -rvf backup {} \; >>backup.log /usr/bin/find /root -type f -newer /etc/installed -exec tar -rvf backup {} \; >>backup.log /usr/bin/find /usr -type f -newer /etc/installed -exec tar -rvf backup {} \; >>backup.log /usr/bin/find /sbin -type f -newer /etc/installed -exec tar -rvf backup {} \; >>backup.log /usr/bin/find /var/db -type f -newer /etc/installed -exec tar -rvf backup {} \; >>backup.log /usr/bin/find /var/gdm -type f -newer /etc/installed -exec tar -rvf backup {} \; >>backup.log /usr/bin/find /var/lib -type f -newer /etc/installed -exec tar -rvf backup {} \; >>backup.log /usr/bin/find /var/local/downloads -type f -newer /etc/installed -exec tar -rvf backup {} \; >>backup.log /usr/bin/find /var/local/logs -type f -newer /etc/installed -exec tar -rvf backup {} \; >>backup.log /usr/bin/find /var/log -type f -newer /etc/installed -exec tar -rvf backup {} \; >>backup.log /usr/bin/find /var/named -type f -newer /etc/installed -exec tar -rvf backup {} \; >>backup.log /usr/bin/find /var/nis -type f -newer /etc/installed -exec tar -rvf backup {} \; >>backup.log /usr/bin/find /var/preserve -type f -newer /etc/installed -exec tar -rvf backup {} \; >>backup.log /usr/bin/find /var/state -type f -newer /etc/installed -exec tar -rvf backup {} \; >>backup.log /usr/bin/find /var/yp -type f -newer /etc/installed -exec tar -rvf backup {} \; >>backup.log chgrp wheel backup* chmod 640 backup* mv backup `date +%y%m%d`.tar gzip `date +%y%m%d`.tar mv backup.log `date +%y%m%d`.log . /usr/local/bin/backup_to_other