Editing
NetHere
(section)
Jump to navigation
Jump to search
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
==== Email Restoral ==== <pre> Storage path prefixes: /nfs/1 is sndg-netapp-1 (on backup-4 - /backup/hosts/2/e0.sndg-netapp-1.nethere.net) /nfs/2 is sndg-netapp-2 (on backup-3 - /backup/hosts/2/e0.sndg-netapp-2.nethere.net) /nfs/3 is sndg-netapp-3 (on backup-2 - /backup/hosts/2/e0.sndg-netapp-3.nethere.net) /nfs/4 is sndg-netapp-1 (on backup-2 - /backup/hosts/2/e0.sndg-netapp-1.nethere.net) /nfs/5 is sndg-netapp-2 (on backup-1 - /backup/hosts/2/e0.sndg-netapp-2.nethere.net) /nfs/6 is sndg-netapp-3 (on backup-2 - /backup/hosts/2/e0.sndg-netapp-3.nethere.net) Looking up a mailbox's Storage Path: You will need to know which directory and NFS server the customer's mail is stored on. Use the Provisioning Tool to get the Storage Path (find the customer's mail account, then click on the Engineering sub-tab under the Email tab). You should end up with something like "/nfs/3/nh/h/t/htchan/Maildir". Match the prefix of the storage directory with an NFS server (see prefixes above). 1) If restoring a recently deleted mail account: a) Look for the archive on mailbox-1 in /nfs/archive/mail/{platform}/{username}.{date}-{PID}.tar.gz. If it doesn't exist, it's been too long and the only way to get email back is to restore from backup. b) Make sure the account is re-created in Provisioning Tool and look up the storage path (see "Looking up a mailbox's Storage Path" above). c) Extract the archive to a temporary directory: Sample command: cd /tmp; tar xzvpf /nfs/archive/mail/nh/zella.20090902-7508.tar.gz Sample output: nfs/2/nh/z/e/zella/ nfs/2/nh/z/e/zella/Maildir/ nfs/2/nh/z/e/zella/Maildir/tmp/ nfs/2/nh/z/e/zella/Maildir/new/ nfs/2/nh/z/e/zella/Maildir/cur/ nfs/2/nh/z/e/zella/Maildir/maildirsize nfs/2/nh/z/e/zella/Maildir/.Trash/ nfs/2/nh/z/e/zella/Maildir/.Trash/tmp/ nfs/2/nh/z/e/zella/Maildir/.Trash/new/ nfs/2/nh/z/e/zella/Maildir/.Trash/cur/ nfs/2/nh/z/e/zella/Maildir/.Trash/maildirfolder nfs/2/nh/z/e/zella/Maildir/.Drafts/ nfs/2/nh/z/e/zella/Maildir/.Drafts/tmp/ nfs/2/nh/z/e/zella/Maildir/.Drafts/new/ nfs/2/nh/z/e/zella/Maildir/.Drafts/cur/ nfs/2/nh/z/e/zella/Maildir/.Drafts/maildirfolder nfs/2/nh/z/e/zella/Maildir/.Sent Items/ nfs/2/nh/z/e/zella/Maildir/.Sent Items/tmp/ nfs/2/nh/z/e/zella/Maildir/.Sent Items/new/ nfs/2/nh/z/e/zella/Maildir/.Sent Items/cur/ nfs/2/nh/z/e/zella/Maildir/.Sent Items/maildirfolder nfs/2/nh/z/e/zella/Maildir/courierpop3dsizelist Note: In the above output, notice that the Maildir is located in "nfs/2/nh/z/e/zella", it will be used in the next step. d) Copy the Maildir files to the new mailbox storage path using tar (tar does a better job at preserving things like symbolic links and permissions than cp or mv): Sample command: cd /tmp/nfs/2/nh/z/e/zella; tar cf - Maildir | (cd /nfs/3/nh/z/e/zella; tar xvpf -) Output: You should list the files as it is copied. Basically, similar to what you saw in step "c" above but without the "nfs/2/nh/z/e/zella" prefix. Note: The command format is basically: cd /tmp/{restored-maildir-path-see-note-in-step-c}; tar cf - Maildir | (cd {new-storage-path-without-Maildir}; tar xvpf -) e) Clean up temporary directory: Sample command: cd /tmp; rm -rf nfs 2) If restoring a zfs mailbox (from the last week) to a particular date's backup: a) login to the correct sndg-netapp-[1/2/3]-new b) get the files from the correct zfs snapshot Sample commands: cd /tank0/mail/.zfs/snapshot/20180215-0/nh/c/h/christineat ls -l cd to the desired directory and copy the files over to the users mailbox cp -p /tank0/mail/.zfs/20180215-0/nh/c/h/christineat/Maildir/cur /tank0/mail/nh/c/h/christineat/Maildir/cur 3) If restoring a mailbox to a particular date's backup: a) Look up the storage path to the customer's mailbox and determine which backup server the dump file is on (see "Looking up a mailbox's Storage Path" and "Storage path prefixes" above). b) Restore the level 0 and any incremental backups (in order) to /tmp on the backup server: Sample commands: cd /tmp restore4x -if /backup/hosts/2/e0.sndg-netapp-2.nethere.net/20090912-0/mail.dump chflags -R 0 /tmp restore4x -if /backup/hosts/2/e0.sndg-netapp-2.nethere.net/20090913-1/mail.dump chflags -R 0 /tmp ...skipped repetitive stuff here... restore4x -if /backup/hosts/2/e0.sndg-netapp-2.nethere.net/20090918-6/mail.dump chflags -R 0 /tmp Note: After each restore, we need to recursively remove all flags from /tmp to eliminate the immutable flag that gets set on the files (this happens only on NetApp dumps... who knows why). c) Create a new tar of the Maildir directory so that it can be copied to mailbox-1 for further processing: Sample command: cd /tmp/nh/z/e/zella; tar cf /tmp/archive.tar Maildir d) Clean up /tmp: Sample command: rm -rf /tmp/nh Note: Depending on the platform, it might be /tmp/nh, /tmp/si, or /tmp/zn. e) Copy the /tmp/archive.tar file to /tmp on mailbox-1. f) On mailbox-1, extract the Maildir archive on top of what they already have: Sample command: cd /nfs/2/nh/z/e/zella; tar xvpf /tmp/archive.tar g) Remove /tmp/archive.tar. </pre>
Summary:
Please note that all contributions to JCWiki may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see
JCWiki:Copyrights
for details).
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)
Navigation menu
Personal tools
Not logged in
Talk
Contributions
Create account
Log in
Namespaces
Page
Discussion
English
Views
Read
Edit
View history
More
Search
Navigation
Main page
Recent changes
Random page
Help about MediaWiki
Tools
What links here
Related changes
Special pages
Page information