Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
Next revision Both sides next revision
cpanel:restore-from-crash-or-hack [2011-04-14 22:00:42]
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 important>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/files //inside// that directory to be synced with the destination, as opposed to the directory itself. This can be seen for example in the difference between the /etc/ sync below, and the Apache rsync that follows.</note>+<note important>**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/files //inside// that directory to be synced with the destination, as opposed to the directory itself. This can be seen for example in the difference between the /etc/ sync below, and the Apache rsync that follows.</note>
  
 Let's begin by syncing over important /etc/ configuration files: Let's begin by syncing over important /etc/ configuration files:
Line 17: Line 17:
 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 spammer* \ cpbackup.conf cpupdate.conf quota.conf shadow* *rndc* ips* ipaddrpool* ssl hosts spammer* \
-skipsmtpcheckhosts relay* localdomains remotedomains /etc</sxh> +skipsmtpcheckhosts relay* localdomains remotedomains my.cnf /etc</sxh> 
-<note tip>You may also want to copy /etc/crontab and /etc/cron.d/ if you have custom cron scripts.</note>+<note tip>You may also want to copy <c>/etc/crontab</c> and <c>/etc/cron.d/</c> if you have custom cron scripts.</note>
  
 Next up is Apache and its configuration: Next up is Apache and its configuration:
  
 <sxh plain>rsync -avHz /olddrive/usr/local/apache/conf /usr/local/apache <sxh plain>rsync -avHz /olddrive/usr/local/apache/conf /usr/local/apache
-rsync -avHz /olddrive/usr/local/apache/modules /usr/local/apache +rsync -avHz /olddrive/usr/local/apache/modules /usr/local/apache 
-rsync -avHz /olddrive/usr/local/apache/domlogs /usr/local/apache</sxh>+rsync -avHz /olddrive/usr/local/apache/domlogs /usr/local/apache</sxh>
  
 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:
Line 54: Line 54:
 <sxh plain>rsync -avHz /olddrive/var/spool/cron /var/spool</sxh> <sxh plain>rsync -avHz /olddrive/var/spool/cron /var/spool</sxh>
  
-Root user MySQL configuration (stores root password for password-less shell connects):+Root user MySQL configuration:
  
 <sxh plain>rsync -avHz /olddrive/root/.my.cnf /root</sxh> <sxh plain>rsync -avHz /olddrive/root/.my.cnf /root</sxh>