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 [2014-12-29 21:12:33] rory.blanchard [Data Restoration] |
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: | ||
- | <code>cd / | + | <sxh plain> |
- | skipsmtpcheckhosts relay* localdomains remotedomains my.cnf /etc | + | cd / |
- | </code> | + | rsync -avHz user* trueuser* domainips secondarymx domainalias valiases |
+ | </sxh> | ||
<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 ===== |