Very Simple Shell Script
First off I don't know anything about shell scripting, so with that here is what I have, I made a very simple script to do an automatic backup every night of one of my servers to another server through nfs, I Have 2 directories that I am backing up right now (I am going to be adding more) The problem I am having is the script runs compleatly through and does the backup and the last thing it says is "tar: Error exit delayed from previous errors"
This script is backing up some files that may be in use (its about 60 websites) I will put the script below and see what you think, I think it is working right but that error worries me a bit. rm -f /backup/backup.old.tar.gz mv /backup/backup.tar.gz /backup.old.tar.gz tar czvf /backup/backup.tar.gz /porky/sites tar rzvf /backup/backup.tar.gz /porky/conf And then when I want to run it I just type /etc/porky.conf which is the file above. So is this script right? or did I miss something to get that tar error I put above? |
Re: Very Simple Shell Script
Quote:
Code:
rm -f /backup/backup.old.tar.gz Jamie... |
I wondered if that would be the way to do it, so I could put as many directories after that as I want? Right now I am backing up the sites and the web config directory, but I want to start backing up the user's directory and a few other odds and ends.
|
{* oh well, someone has already solved this one *}
Can you unpacl the archives once the sript has finished? What is printed to the screen when you run the individual commands outside of the script? Alex |
Yes I can unpack the archives from the script, and it looks like everything is there, I am going to try the script from above and see if that works, I will report back.
|
Ok using the script from jharris I am backing up 5 different folders now and it is working great, thanks.
|
All times are GMT -5. The time now is 11:16 PM. |