Portal:Data Services/Admin/Runbooks/Restore NFS files
Backups for the primary NFS cluster are run once a week. If a user needs a file restored from a week before that was deleted or damaged by mistake, this is the procedure to try. There is generally a current and one older backup available on cloudbackup2001.codfw.wmnet (tools project backups) and cloudbackup2002.codfw.wmnet (all others except maps and scratch which are not backed up).
The backups are basically bdsynced LVM snapshots that can be mounted on the cloudbackup2001 and cloudbackup2002 servers where they reside. The current backup is a sync of the snapshot on labstore1005.
First, mount the backup volume.
When mounting a backup from a DRBD device, you have to tell the OS what kind of filesystem it is, since it just sees "DRBD".
root@cloudbackup2001# mount -t ext4 /dev/backup/tools-project /mnt/tools-project/
Additionally, it is very important to unmount the backup as soon as work is done with it, because the backup jobs will fail if the device is mounted.
Now you can scp any files you need to your local machine and copy them into place on the NFS share where the file was removed or damaged.
For obvious reasons, this is not a very good method to restore the entire volume from. In most cases, a volume will be multiple TB in size.
Communication and support
Support and administration of the WMCS resources is provided by the Wikimedia Foundation Cloud Services team and Wikimedia movement volunteers. Please reach out with questions and join the conversation: