|
Off Topic but Right Place to ask.
I need to create a cron job to mirror my websites but I'm clueless as to how to do macros (or whatever they are called).
This is what I think I need:
1. tar -cpzf domainname.tar.gz *
2. Open ssh to Mirrored Site
3. wget domainIP/domainname.tar.gz
4. wait xxx amount of time for xfer to finish or just execute the next command with the prompted?
5. tar -xzf domainname.tar.gz
6. Close ssh session
In case I got the above all wrong and you can't tell what I'm trying to do, let me go line by line.
1. Create a ZIP of my site.
2. Secure Telnet to my mirrored site.
3. Transfer the ZIP file.
4. Not sure if this is needed - a wait long enough to let the xfer finish before the next command runs.
5. unZIP the ZIP
6. Close the Secure Telnet session.
I'd like this to run 2 times a day (for web page changes - not that they make any) and I'll have another job that just updates the email and accounts every hour.
Your help is greatly appreciated!
Tron Of Borg
|