biolocal:FShomesRecover

From Wiki CEINGE

(Difference between revisions)
Jump to: navigation, search
Revision as of 19:23, 9 October 2007 (edit)
Gianluca (Talk | contribs)

← Previous diff
Current revision (11:28, 19 June 2008) (edit) (undo)
Gianluca (Talk | contribs)

 
(4 intermediate revisions not shown.)
Line 1: Line 1:
-The following procedure provides a smooth way to recover the homes of the file server, syncronizing the maildir folder before the whole home directory. This way, it is possible to switch the mailserver on before the entire sync is completed.+The following procedure provides a way to recover the homes of the ceinge file server whenever a disk failure occurs. It is based on maildir folder syncronization with the backup server. This way, it is possible to switch the mailserver on before the entire sync is completed.
- +Before any rebuild from the backup data, please make sure every attempt to recover the disks is made; particularly, in case of linux raid disks [[biolocal:linux raid|try this]].
Connect to the File Server 143.225.151.27 Connect to the File Server 143.225.151.27
Line 22: Line 22:
for i in `ls`; \ for i in `ls`; \
do \ do \
 +echo $i; \
rsync -avz -e ssh --exclude=*archive* $i/login/ root@143.225.151.27:/data01/FS/ceinge/Home/$i/login/; \ rsync -avz -e ssh --exclude=*archive* $i/login/ root@143.225.151.27:/data01/FS/ceinge/Home/$i/login/; \
done; done;
</pre> </pre>
 +
 +Start the mail server:
 +<pre>
 +/etc/init.d/Mailscanner start
 +</pre>
 +
 +Recover the archive boxes:
 +<pre>
 +for i in `ls`; \
 +do \
 +echo $i; \
 +rsync -avz -e ssh $i/login/Maildir/archive/ root@143.225.151.27:/data01/FS/ceinge/Home/$i/login/Maildir/archive/; \
 +done;
 +</pre>
 +
 +Then syncronize the archive
Syncronize the whole home directories without the login directory (already done in the previous step) Syncronize the whole home directories without the login directory (already done in the previous step)

Current revision

The following procedure provides a way to recover the homes of the ceinge file server whenever a disk failure occurs. It is based on maildir folder syncronization with the backup server. This way, it is possible to switch the mailserver on before the entire sync is completed. Before any rebuild from the backup data, please make sure every attempt to recover the disks is made; particularly, in case of linux raid disks try this.

Connect to the File Server 143.225.151.27

Recover the disk and make the base directory for the ceinge homes:

mkdir /data01/FS /data01/FS/ceinge /data01/FS/ceinge/Home

Connect to the backup server 143.225.151.42

Make the home dirs without descending into them (-pogdv options)

rsync -pogdv -e ssh /media/usbdisk1/FSceinge/ceinge/Home/ root@143.225.151.27:/data01/FS/ceinge/Home/

Start syncronizing the login folder (contains Maildir)

for i in `ls`; \
do \
echo $i; \
rsync -avz -e ssh --exclude=*archive* $i/login/ root@143.225.151.27:/data01/FS/ceinge/Home/$i/login/; \
done;

Start the mail server:

/etc/init.d/Mailscanner start

Recover the archive boxes:

for i in `ls`; \
do \
echo $i; \
rsync -avz -e ssh $i/login/Maildir/archive/ root@143.225.151.27:/data01/FS/ceinge/Home/$i/login/Maildir/archive/; \
done;

Then syncronize the archive

Syncronize the whole home directories without the login directory (already done in the previous step)

for i in `ls`; \
do \
rsync -avz -e ssh --exclude=login* $i/ root@143.225.151.27:/data01/FS/ceinge/Home/$i/; \
done;
Personal tools