Thanks. That did bring an other problem up though. When I ran the script it showed me this output(found below). One of the problems is it looks like it is trying to run each directory found by the "find" portion of the tar command, as its own command. I have no idea why? I have run the tar command as its own script an it works fine but when I put it in this script it craps out on me.
Code:
[root@hostname ~]# sudo tar -zcvf - /one/of/the/directories/or/files
tar: Removing leading `/' from member names
/var/log/httpd/error_log
Â¥NèÂÂÃÃÂ}í§ÃIkÃJª^ÂÃB
af#m$µ+öÃ*Ãä$lÇ Â¸Â´Ãw#¤ýÿÃA«5ÃþJÃ¥~amÂÂ
ÂKeÃT,Â*RÙ²ÃÃBÃn´à¶9\ÂÆøvå¬Ã
Ü
ðÂÂo¡Ã*à \Ã*2ÂhÃ>´¾ÂoÃÃ×ƴµZf¥©Uz¾Â*jè¤5©yHÂ|,s§q£ÂÂÂ*Â
qU£+®ø
T-4f§¤ÃïÂxÒ±$ÂÂpô¢Ã~%
Ã_¯Â
FÂF9Â)ÃÞ¬J!Â*ÃÃ袱3eÃñ²MÃâÂó_(к]Z£ ö3Â}ûòõþڥ¢\ÂÃÂX+ªºÃ*ÂUM28ÃöÂVxÂÂöô=ÃÃZ½;úZóS°ÃeO3Ã¥./lSê»ÛÃ
 0Â
kÃÃN
³ï¥tX+µ*ÃV"û
;hõÂ*ñÃþAAAAAAAÃ
ÃçHOéÃÿøªnÃ1¯«³ÂLÃÃ#óÂVÿCÂ*pOÂÃ/cxp°tþ,µÃYjÃÃ÷d ÃoÿÃdS([root@hostname ~]#
[root@hostname ~]# /var/log/audit/audit.log.3
PuTTY-bash: /var/log/audit/audit.log.3: No such file or directory
PuTTY[root@hostname ~]# /var/log/audit/audit.log.1
-bash: /var/log/audit/audit.log.1: No such file or directory
[root@hostname ~]# /var/log/audit/audit.log.2
-bash: /var/log/audit/audit.log.2: No such file or directory
[root@hostname ~]# /var/log/audit/audit.log.4
-bash: /var/log/audit/audit.log.4: No such file or directory
This is the out put it should have
Code:
sudo tar -zcvf - /var/log/audit/audit.log.3 /var/log/audit/audit.log.4 /var/log/audit/audit.log.2
tar: Removing leading `/' from member names
/list/a/lot/of/files
then ssh to the backup server for "tar"ing