Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
cpanel:restore-from-crash-or-hack [2011-09-16 04:11:21] garrett.plasky Approved |
cpanel:restore-from-crash-or-hack [2015-01-20 02:00:56] rory.blanchard |
||
---|---|---|---|
Line 14: | Line 14: | ||
Let's begin by syncing over important /etc/ configuration files: | Let's begin by syncing over important /etc/ configuration files: | ||
- | <sxh plain>cd / | + | <sxh plain> |
- | vfilters exim* backupmxhosts proftpd* pure-ftpd* logrotate.conf passwd* group* *domain* *named* wwwacct.conf | + | cd / |
- | cpbackup.conf cpupdate.conf quota.conf shadow* *rndc* ips* ipaddrpool* ssl hosts spammer* | + | rsync -avHz user* trueuser* domainips secondarymx domainalias valiases |
- | skipsmtpcheckhosts relay* localdomains remotedomains my.cnf / | + | </ |
<note tip>You may also want to copy < | <note tip>You may also want to copy < | ||
Line 81: | Line 82: | ||
Since this is a " | Since this is a " | ||
+ | |||
+ | ===== Mail Sync ===== | ||
+ | |||
+ | If you have recovered from a recent backup or otherwise have a stale copy of your data and want to synchronize mail from another server, you can do so over the network with the following command: | ||
+ | |||
+ | < | ||
+ | for i in `cat / | ||
+ | </ | ||
+ | |||
+ | In the example above the command is run from the source machine where ip.ip.ip.ip is the destination machine. Since this loops through all the users, it's going to ask you for a password each time. To avoid this authenticate the source machine using an ssh key before running the command: | ||
+ | |||
+ | < | ||
+ | ssh-keygen –t rsa | ||
+ | ssh-copy-id root@ip.ip.ip.ip | ||
+ | </ | ||
+ | \\ | ||
+ | \\ | ||
===== Notes ===== | ===== Notes ===== |