|
|
|
|
| Using Tar - Strange Results |
|
|
|
[Original]
[Print]
[Top]
|
I have a script that I can run from a shell and it works fine .. all it does is tars up a directory .... here is the script:
#!/bin/bash
# Backup Script for the qa4 directory # Run using qabackup
tar -cvpzf /var/backups/qa4_$(date '+%Y-%m-%d').tgz /opt/apps/qa4
# Now we copy to the backup server cat /var/backups/qa4_$(date '+%Y-%m-%d').tgz | ssh 192.168.1.5 "cd /var/backups; cat > qa4_$(date '+%Y-%m-%d').tgz"
So after it compresses the directory it sends it to a backup server ..... It works fine this way .... So I added this to a cron job to run every morning at 2am .. using the command
cron -e 0 2 * * * /usr/bin/qabackup
it was added and it runs at 2am .. BUT ... instead of the tar file being 90 some odd meg that it should be it is only 14 meg .... what is going on? What do I need to look at? How can I determine what the trouble is? I tried using webmin to add the cron job too and I got the same resulting small and corupt tar file....
|
|
|
[Original]
[Print]
[Top]
|
|
[Original]
[Print]
[Top]
|
SOLVED ......
I tool out the -v option for verbose mode and it worked ..... at least last night it did ... only time will tell.
|
|
|
[Original]
[Print]
[Top]
|
|
|