I am currently running a script in leopard every few days to make sure I have backed up my data on a remote server using:
#!/bin/bash
rsync -avvz ~/Documents ~/Workspace -e ssh admin@myhost.com:~/Backup/
There are limitations to this method i.e. I can't look at files that have been deleted a few backups ago. What is the best way to automate this process?
Answer
Can you set up a cron job in leopard?
The example rsync options (-avvz) don't delete files in the 'remote' directory which have been removed from the local directory since an earlier backup. They should still be in the remote directory.
But your example is confusing: are you copying files from ~/Documents to ~/Workspace or to ~/Backup/ on myhost.com
This may be a peculiarity of leopard, but it looks like you're just copying from ~/Documents to ~/Workspace in which case the rest of the line might be ignored (and you don't need to invoke ssh)
You should also consider ending the source directory specification with a /
I would agree with Peter that rotating backups are good — if you have the available disk space.
No comments:
Post a Comment