User Tools

Site Tools


services:labtest:old:filesync

Labtest File Synchronization (ltsave)

During labtest, student home directories are stored locally on the machine where each student works. Lab machines will send a compressed copy of each local labtest home directory to the file server under these circumstances:

  • Every time a user logs out of a machine that is in labtest mode.
  • Every time a machine is restarted that is in labtest mode.
  • Every 15 minutes when a machine is in labtest mode. (In order to ensure that not all machines are sending data to the file server simultaneously, each machine will choose a random time to synchronize for the first time within the first 4 minutes, and will then syncronize every 15 minutes thereafter.)

Accessing ltsave data might be helpful for a number of reasons, including:

  • Monitoring student progress during a test.
  • Retrieval of forgotten submissions.
  • Enabling students to move between machines during a test.

Location of Ltsave Data

Faculty can access ltsave data in /eecs/ltsave on all EECS tech-supported Linux systems.

The path right up to the student files will look like this:

/eecs/ltsave/course/<COURSE>/<ID>/<HOST>/<USER>/MM-DD-YYYY-HH:MM:SS.txz

For example, the submission for course 9999, labtest ID 103, host ea01, user jas, taken November 11, 2014 at 17:28:40 would be stored in the file /eecs/ltsave/course/9999/103/ea01/jas/06-01-2009-12:25:25.txz.

The “.txz” extension on the timestamp stands for “tar” and “xz”. tar is a method of storing many files together in a single archive, while xz is a compression format much like “zip”, used because of its high compression ratio.

NOTE: Files are tarred and compressed on the local machine. In order to save space, and minimize load and network traffic to the file server, if two simultaneous synchronizations are identical, the second one will be dropped.

Find A Student Ltsave Data

If you know the course, and labtest ID, and want to find a students ltsave data, you do it like this:

% find /eecs/ltsave/course/9999/103 -maxdepth 2 -name "jas"
/eecs/ltsave/course/9999/103/ea01/jas

Here, we can see that for course “9999”, labtest ID “103”, machine “ea01”, user “jas” was logged in.

List All Ltsave Data For A Student

Once you've identified the directory containing the ltsave data for a student, simply list the files to view all the data for that student:

% ls /eecs/ltsave/course/9999/103/ea01/jas
11-11-2014-17:13:27.txz  11-11-2014-17:19:53.txz  11-11-2014-17:28:40.txz 

Here we can see 3 ltsave archives.

Listing Files Inside an Ltsave Archive

To see a list of files in an ltsave archive:

% tar --force-local -tJf /eecs/ltsave/course/9999/103/ea01/jas/11-11-2014-17:28:40.txz
./
./.cshrc
./file1
./file2
./file3

NOTE: The –force-local option is required because tar considers files with a : in their name to be on a remote server.

Extracting Files From an Ltsave Archive

You can extract all the files from an ltsave archive like this:

% cd /tmp
% mkdir restore
% chmod 600 restore (keep the restore private)
% tar --force-local -xJf /eecs/ltsave/course/9999/103/ea01/jas/11-11-2014-17:28:40.txz
% ls
file1 file2 file3

You can also selectively extract files as well:

% tar --force-local -xJf /eecs/ltsave/course/9999/103/ea01/jas/11-11-2014-17:28:40.txz ./file1

Retention

Ltsave data that is copied to /eecs/ltsave will be saved for 60 days ONLY after which it is deleted, and not recoverable. Labtest data is NOT backed up as part of our daily backup routine.

services/labtest/old/filesync.txt · Last modified: 2017/09/14 11:07 by 127.0.0.1