|
本帖最后由 Test 于 2015-3-16 10:14 编辑
the "/scripts/pkgacct" cPanel script to backup the cPanel account and then use the SCP command to transfer the file to the backup server.
http://www.ss64.com/bash/scp.html
Then to automate it, just create a cron job for it.
cPanel's backup system will do the exact same thing and transfer it to a remote server if you configure it to do so.
- #!/bin/bash
- rsync -avzr -e "ssh -p SSHPORT /backup/cpbackups/ user@remoteserver.name.com:/path/on/remote/server/"
复制代码
This is of course if you're using the old backup system. The latest cpanel update has all of this built in. However, you can run the above on a cron if you'd like. Or better yet, throw it in as a postcpbackup hook and it will automatically run every time the backup completes.
Of course you don't want your backup server filling up. So on the backup server, you can use a second cron using the find command to delete all files older than X days.
|
|