-   Programming (
-   -   simple backup script needed (

ferret_dude 05-24-2004 08:00 AM

simple backup script needed
I need a simple script witch compress all files in a directory
The script should automatically sett the file name to the current date ,
After transferring the file to a remote server the script shall delete the tar.gz file it made

That is about it


keefaz 05-24-2004 08:46 AM

well, nothing complicated. for compress and date, use tar

for the remote serveur you have to precise the connection protocol if you want help for that

ferret_dude 05-24-2004 09:16 AM

what about giving a :newbie: an example of how the script may look like ?
the problem is how to insert the date into the filename . BTW i want it to be in MM/DD/YY format

keefaz 05-24-2004 09:32 AM

well here is a short example (do man date to fine tunning) :

today=`date +%m-%d-%y`
tar -c -z -f "$today.tar.gz" /your/dir/to/backup

Edit : I formated the date according to your wish (MM/DD/YY)

ferret_dude 05-24-2004 09:45 AM

Thanks alot :D i wil give it a try :)

All times are GMT -5. The time now is 05:47 AM.