oops.. that should be /tmp/exclude. sorry. I found the "*" was not needed when using -T option. So I didn't attempt it on the -X option.
Lemme try... no ..didn't work... :( I will attach the full script Anita Lewis wrote: > > Is it possible to tar backup everything in /home except > > /home/httpd/html/linux-sxs? > > tar cvzfp /home/backup/linux.backup.tgz -T /tmp/filelist -X /tmp/xclude > > file /tmp/filelist: > > /home/httpd/html/linux-sxs/ > I'm glad you asked this, because I couldn't get it to work a while back and > gave up. I tried again this morning and found that I need to do this with > the exclude file: > /home/httpd/html/linux-sxs/* -- May the Force and Farce be with Linux and you. Join the friendly chit-chat in http://www.linux-sxs.org & news://news.hkpcug.org
#!/bin/bash XCLUDE=/tmp/xclude FLIST=/tmp/filelist TGT=/home/samba/public/linux SRC=/home/backup/config.tar.gz # individual files ls -1 /etc/rc.d/rc.* > $FLIST ls -1 /etc/*.conf >> $FLIST ls -1 /etc/crontab >> $FLIST ls -1 /etc/fstab >> $FLIST ls -1 /etc/hosts* >> $FLIST ls -1 /etc/services >> $FLIST ls -1a /etc/.issue >> $FLIST ls -1 /etc/*tab >> $FLIST ls -1 /boot/grub/menu.lst >> $FLIST ls -1 /usr/sbin/modemd >> $FLIST ls -1 /usr/src/linux/.config >> $FLIST ls -1 /etc/*rc >> $FLIST ls -1 /etc/ftp* >> $FLIST ls -1 /home/backup/backup >> $FLIST ls -1 /home/backup/partition >> $FLIST ls -1 /etc/aliases >> $FLIST # folders echo "/etc/X11/xinit/" >> $FLIST echo "/etc/htdig/" >> $FLIST echo "/etc/pureftpd/" >> $FLIST echo "/etc/mail/" >> $FLIST echo "/etc/cron.d/" >> $FLIST echo "/etc/ppp/" >> $FLIST echo "/etc/pam.d/" >> $FLIST echo "/etc/logrotate.d/" >> $FLIST echo "/etc/logcheck/" >> $FLIST echo "/etc/inet.d/" >> $FLIST echo "/etc/rc.d/init.d/" >> $FLIST echo "/etc/modules/" >> $FLIST echo "/etc/samba.d/" >> $FLIST echo "/etc/ssh/" >> $FLIST echo "/etc/httpd/" >> $FLIST echo "/etc/portsentry/" >> $FLIST echo "/etc/sysconfig/daemons/" >> $FLIST echo "/etc/sysconfig/network-scripts/" >> $FLIST echo "/var/named/" >> $FLIST echo "/home/ipcheck/" >> $FLIST echo "/home/seti/" >> $FLIST echo "/home/scripts/" >> $FLIST echo "/home/commo/" >> $FLIST echo "/etc/news/" >> $FLIST echo "/var/geektools/" >> $FLIST echo "/etc/config.d/shells/" >> $FLIST echo "/home/httpd/html/" >> $FLIST echo "/etc/squid/" >> $FLIST # exclude echo "/home/httpd/html/linux-sxs/*" > $XCLUDE tar czvfp $SRC -T ${FLIST} -X $XCLUDE cp $SRC $TGT rm $FLIST