Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!

Click here to return to the 'How to automate a remote backup' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
How to automate a remote backup
Authored by: sierratarn on Aug 27, '05 04:42:40AM

[code]The "rm" step is strictly not necessary. Since dobackup uses the > to redirect output instead of >> the file is completely overwritten each time.[/code]

The advantage of not using the 'rm' line (just remove the line from the script) is that a database backup is left on the database machine.

A few other thoughts:
- A similar script would be great for backing up the files associated with a website. Though they don't change as often it's a great practice and not too much to automate.
- If you are using password controlled databases you may need to add "-u USER and -pPASSWORD" to the dobackup script. This isn't too bad if you also make it so nobody else can read the script ("chmod go-r dobackup"). This way you can protect the password from other users (but not Root).

[ Reply to This | # ]