Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision Next revision Both sides next revision | ||
cpanel:restore-from-crash-or-hack [2011-04-07 17:24:36] garrett.plasky Approved |
cpanel:restore-from-crash-or-hack [2011-04-14 22:05:51] garrett.plasky Approved |
||
---|---|---|---|
Line 10: | Line 10: | ||
Restoring the data is just a matter of rsync-ing over certain directories and configuration files. | Restoring the data is just a matter of rsync-ing over certain directories and configuration files. | ||
- | **Note:** rsync functions different than users might expect with regards to trailing slashes; careful use of them is needed to ensure data is copied correctly. When syncing a directory, adding a trailing slash to the source directory will cause all directories/ | + | <note important> |
Let's begin by syncing over important /etc/ configuration files: | Let's begin by syncing over important /etc/ configuration files: | ||
- | <code console># cd / | + | <sxh plain>cd / |
vfilters exim* backupmxhosts proftpd* pure-ftpd* logrotate.conf passwd* group* *domain* *named* wwwacct.conf \ | vfilters exim* backupmxhosts proftpd* pure-ftpd* logrotate.conf passwd* group* *domain* *named* wwwacct.conf \ | ||
- | cpbackup.conf cpupdate.conf quota.conf shadow* *rndc* ips* ipaddrpool* ssl hosts /etc</code> | + | cpbackup.conf cpupdate.conf quota.conf shadow* *rndc* ips* ipaddrpool* ssl hosts spammer* \ |
- | **Note**: | + | skipsmtpcheckhosts relay* localdomains remotedomains my.cnf |
+ | <note tip>You may also want to copy <c>/ | ||
- | Next up is Apache and it' | + | Next up is Apache and its configuration: |
- | <code console># rsync -avHz / | + | <sxh plain>rsync -avHz / |
- | # rsync -avHz / | + | rsync -avHz / |
- | # rsync -avHz / | + | rsync -avHz / |
Next is named (bind). This is only needed if you run your own DNS: | Next is named (bind). This is only needed if you run your own DNS: | ||
- | <code console># rsync -avHz / | + | <sxh plain>rsync -avHz / |
Next we'll do cPanel and it's related configurations: | Next we'll do cPanel and it's related configurations: | ||
- | <code console># rsync -avHz / | + | <sxh plain>rsync -avHz / |
Next up, MySQL databases: | Next up, MySQL databases: | ||
- | <code console># rsync -avHz / | + | <sxh plain>rsync -avHz / |
Misc cPanel files and templates: | Misc cPanel files and templates: | ||
- | <code console># rsync -avHz / | + | <sxh plain>rsync -avHz / |
Client and server SSL certificates: | Client and server SSL certificates: | ||
- | <code console># rsync -avHz / | + | <sxh plain>rsync -avHz / |
User bandwidth data: | User bandwidth data: | ||
- | <code console># rsync -avHz / | + | <sxh plain>rsync -avHz / |
Exim's mail queue: | Exim's mail queue: | ||
- | <code console># rsync -avHz / | + | <sxh plain>rsync -avHz / |
- | + | ||
- | Root user MySQL configuration (stores root password for password-less shell connects): | + | |
- | + | ||
- | <code console># | + | |
+ | Root user MySQL configuration: | ||
+ | <sxh plain> | ||
Finally, all user data (mail, web files, etc.): | Finally, all user data (mail, web files, etc.): | ||
- | <code console># rsync -avHz / | + | <sxh plain>rsync -avHz / |
Line 67: | Line 66: | ||
Because we've changed some cPanel files around and imported a bunch of user data, we'll want to make sure that these changes are picked up: | Because we've changed some cPanel files around and imported a bunch of user data, we'll want to make sure that these changes are picked up: | ||
- | <code console># / | + | <sxh plain>/ |
- | # / | + | / |
- | # / | + | / |
- | # / | + | / |
- | # / | + | / |
- | # / | + | / |
- | # / | + | / |
- | # / | + | / |
- | # / | + | / |
Since we copied over the contents of < | Since we copied over the contents of < | ||
Line 84: | Line 83: | ||
===== Notes ===== | ===== Notes ===== | ||
- | * This was last tested to work as of cPanel/WHM 11.24. Newer versions might change the functionality of scripts and/or add additional configuration files. | + | * This was last tested to work as of cPanel/WHM 11.26. Newer versions might change the functionality of scripts and/or add additional configuration files. |
{{tag> | {{tag> |