Swarthmore College Department of Computer Science

retrieving a lost file

If you accidentally wiped out an important file, here are a few options:

  • copy your lost file from starfish

    We make a copy (i.e., take a snapshot) of the user filesystem every day at noon, 4pm, 8pm, midnight, 4am, and 8am. If you delete an important file, hopefully one of these snapshots will allow you to recover some of your work (if not, hopefully the daily tape backups mentioned below can help). We store these snapshots in a directory called /m10vols on starfish, and users should be able to copy their own files back from there.

    Here's how to copy your files back on starfish:

    • ssh starfish
    • look at what snapshots are avialable:
      ls -l /m10vols
      drwxr-xr-x  Sep 10 00:07 home-2016-11-07-0015/
      drwxr-xr-x  Sep 10 00:07 home-2016-11-07-0415/
      drwxr-xr-x  Sep 10 00:07 home-2016-11-07-0815/
      drwxr-xr-x  Sep 10 00:07 home-2016-11-07-1215/
    • copy the file(s) back to your home dir, from the snapshot you want:
      cp /m10vols/snap/username/file .

    Here's an actual example, for user jk:

    $ ssh starfish
    starfish$ ls -l /m10vols
    drwxr-xr-x  Sep 10 00:07 home-2016-10-20-0015/
    drwxr-xr-x  Sep 10 00:07 home-2016-10-20-0415/
    drwxr-xr-x  Sep 10 00:07 home-2016-10-20-0815/
    drwxr-xr-x  Sep 10 00:07 home-2016-10-20-1215/
    drwxr-xr-x  Sep 10 00:07 home-2016-11-07-0815/
    drwxr-xr-x  Sep 10 00:07 home-2016-11-07-1215/
    starfish$ ls /m10vols/home-2016-10-20-1215/jk
    Desktop/    public_html/  
    Documents/  cs21/  etc/	   
    starfish$ cp /m10vols/home-2016-10-20-1215/jk/cs21/labs/07/scattergories.py .
  • e-mail local-staff

    We do weekly back-ups of the user disks (every Sunday). It's possible your deleted file is on one of these tape backups.

    In your email to local-staff, please include the following:

    • the name of the file
    • the location of the file (e.g., my cs21 dir)
    • when the file was last modified
    • and how much of an emergency this is (e.g., my HW is due now!)

  • if you are using emacs, look for tilde files (e.g., hw5.c~)

    By default, emacs saves a copy of your file each time you start editing it. If your file is called hw5.c, emacs will save a copy to hw5.c~. Look for these tilde files if you accidentally wipe out your homework program.