Help! I deleted a directory on AFS! What do I do?

Step 1: Don't Panic!

  • AFS is backed up, so you should be OK, and your losses will be minimized.
  • Your AFS home directory is backed up nightly, while your AFS work directory seems to be backed up every two or three days.

Step 2: Determine the full path of the missing directory/file

  • If the files live on AFS home, this will be something similar to /afs/<a>/<account>/<path_to_missing_files>.
  • If the files live on your work area, the path will look something like /afs/<a>/<account>/<path_to_missing_files>.
  • In both of the above, paths, <a> is the first letter of your AFS user name, and <account> is your full AFS user name.

Step 3: Request recovery

  • The backups are stored on tape, so you will need to request the backup be found, and copied to a disk where it can be read.
  • To do this, use the following command:
    • afs_admin recover <full_afs_path>
  • Where <full_afs_path> is the path you came up with in step 2.
  • This will ask you what backup you would like to recover (from which date).
    • hint 1: if the data you are trying to recover hasn't changed recently, try to go for a date that has "(f)" next to it ("full backup"), or as close after that date as possible - will speed up the process.
    • hint 2: do not run the command multiple times just because it is "slow" - things will be even slower (since the server behind it will do more operations in parallel)

Step 4: Recover files

  • Once decided, your backup will be recovered (this will take a long time). The temporary place where this is accessible will be printed at the end (somewhere under /afs/
  • You can now copy your recovered files to AFS where they belong.
  • NB: Wait until it is complete. Problems could occur if you kill the process and restart.

Step 5: Unmount

  • Your backup will remain mounted until you log out of your current session.
  • If you need to request the same backup again (within a reasonable time frame), it will take less time because the directory will be cached.

Bonus info!

  • The above steps work if you need to recover a backup that is more than a day old, or anything in your work space.
  • If you need to recover files from afs home that are as recent as yesterday, these are already cached.
  • You can find these files at: /afs/<a>/<account>/<path_to_missing_files>

Something else to try

  • This should mount the most recent version of your work area
  • fs mkm retrieve work.bjackson.backup
    • eventually unmount this again via fs rmm retrieve (you will eventually forget that this is a backup volume..)


-- BrettJackson - 11-Oct-2012

Edit | Attach | Watch | Print version | History: r5 < r4 < r3 < r2 < r1 | Backlinks | Raw View | WYSIWYG | More topic actions
Topic revision: r5 - 2018-09-12 - JanIven
    • Cern Search Icon Cern Search
    • TWiki Search Icon TWiki Search
    • Google Search Icon Google Search

    Main All webs login

This site is powered by the TWiki collaboration platform Powered by PerlCopyright & 2008-2023 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
or Ideas, requests, problems regarding TWiki? use Discourse or Send feedback