Portal:Data Services/Admin/Runbooks/Restore NFS files

From Wikitech
All procedures in this runbook require admin permissions to complete.

Overview

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.

Restoring

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".

Example:

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.

Limitations

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.

Support contacts

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:

Discuss and receive general support
Stay aware of critical changes and plans
Track work tasks and report bugs

Use a subproject of the #Cloud-Services Phabricator project to track confirmed bug reports and feature requests about the Cloud Services infrastructure itself

Read stories and WMCS blog posts

Read the Cloud Services Blog (for the broader Wikimedia movement, see the Wikimedia Technical Blog)

Related information

Portal:Data Services/Admin/Shared storage