5. Archiving your data

5.1. Archiving selected files

The basic syntax for archiving selected files is dsmc archive /path/to/file(s) -desc="your description here". Thus you can archive a single file:

  tsm> ar /scratch/test1/j1.jpg -desc="First version"

where ar is an abbreviation for archive. Or you can archive multiple files, up to a maximum of 20, on the same command line:

  tsm> ar j1.jpg  h70.jpg  m80.tiff -desc="Second temp version"

More conveniently, or where you wish to batch archive more than 20 files, you can use the -filelist= option to specify a file whose contents are a full pathname to one file on each line, as below:

  cat archlist.020629
/scratch/test1/j1.jpg
/scratch/test1/j2.jpg
/scratch/test1/h70.jpg
/scratch/test1/m80.tiff
/scratch/test1/m90.jpg
/scratch/test1/k90.tiff

  tsm> ar -filelist=./archlist.020629  -desc="In progress version - 29 June 2002"

When repeatedly archiving selected files the importance of using the -description= option becomes clear. The example below shows the output of an q ar /scratch/test1/j* query where no description has been entered and the default has therefore been applied.

       Size  Archive Date - Time    File - Expires on - Description
       ----  -------------------    -------------------------------
  2,411,227  28-06-2002 10:51:37    /scratch/test1/j1.jpg Never Archive Date: 28-06-2002
  2,411,227  30-06-2002 15:07:24    /scratch/test1/j1.jpg Never Archive Date: 30-06-2002
  2,411,227  01-07-2002 12:01:06    /scratch/test1/j1.jpg Never Archive Date: 01-07-2002
  2,411,227  01-07-2002 12:01:06    /scratch/test1/j1.jpg Never Archive Date: 01-07-2002
    760,632  28-06-2002 10:51:37    /scratch/test1/j2.jpg Never Archive Date: 28-06-2002
    760,632  28-06-2002 16:46:03    /scratch/test1/j2.jpg Never Archive Date: 28-06-2002
    760,632  28-06-2002 17:18:54    /scratch/test1/j2.jpg Never Archive Date: 28-06-2002
    760,632  28-06-2002 17:22:28    /scratch/test1/j2.jpg Never Archive Date: 28-06-2002
    760,632  01-07-2002 12:01:06    /scratch/test1/j2.jpg Never Archive Date: 01-07-2002

Using the -description= option can make querying of your archive store much clearer, as below.

       Size  Archive Date - Time    File - Expires on - Description
       ----  -------------------    -------------------------------
  2,411,227  28-06-2002 10:51:37    /scratch/test1/j1.jpg Never Jenkins 1st Initial Scan
  2,411,227  30-06-2002 15:07:24    /scratch/test1/j1.jpg Never Jenkins 1st - 1st amend
  2,411,227  01-07-2002 12:01:06    /scratch/test1/j1.jpg Never Jenkins 1st - 2nd amend
  2,411,227  01-07-2002 12:01:06    /scratch/test1/j1.jpg Never Jenkins 1st Final Version
    760,632  28-06-2002 10:51:37    /scratch/test1/j2.jpg Never Jenkins 2nd Initial Scan
    760,632  28-06-2002 16:46:03    /scratch/test1/j2.jpg Never Jenkins 2nd - 1st amend
    760,632  28-06-2002 17:18:54    /scratch/test1/j2.jpg Never Jenkins 2nd - 2nd amend
    760,632  28-06-2002 17:22:28    /scratch/test1/j2.jpg Never Jenkins 2nd - 3rd amend
    760,632  01-07-2002 12:01:06    /scratch/test1/j2.jpg Never Jenkins 2nd Final Version

5.2. Archiving multiple files and directories

As with the syntax for querying the archive server, there are subtle differences in the interpretation of similar-looking filepaths. For example, the first command listed below will just archive the directory folder and not the files contained therein.

  tsm> ar "C:\My Documents\html-docs\Mac"

  Archive function invoked.

  Directory-->            0 \\cles.oucs\c$\My Documents\html-docs\Mac [sent]
  Archive processing of '\\cles.oucs\c$\My Documents\html-docs\MAC' finished
  without failure.

  Total number of objects inspected:        2
  Total number of objects archived:         1
  Total number of objects updated:          0
  Total number of objects rebound:          0
  Total number of objects deleted:          0
  Total number of objects expired:          0
  Total number of objects failed:           0
  Total number of bytes transferred:        0  B
  Data transfer time:                    0.00 sec
  Network data transfer rate:            0.00 KB/sec
  Aggregate data transfer rate:          0.00 KB/sec
  Objects compressed by:                    0%
  Elapsed processing time:           00:00:03

To archive a directory and it's immediate contents, add a terminating slash "/" (windows), "\" (Linux) to the file path.

  tsm> ar "C:\My Documents\html-docs\Mac\"
  Archive function invoked.

  Directory-->            0 \\cles.oucs\c$\My Documents\html-docs\Mac [Sent]
  Normal File-->    786,021 \\cles.oucs\c$\My Documents\html-docs\Mac\macjpgs.zip [Sent]
  Normal File-->    755,690 \\cles.oucs\c$\My Documents\html-docs\Mac\macpcts.zip [Sent]
  Archive processing of '\\cles.oucs\c$\My Documents\html-docs\Mac\*' finished
  without failure.

  Total number of objects inspected:        4
  Total number of objects archived:         3
  Total number of objects updated:          0
  Total number of objects rebound:          0
  Total number of objects deleted:          0
  Total number of objects expired:          0
  Total number of objects failed:           0
  Total number of bytes transferred:   767.71 KB
  Data transfer time:                    1.16 sec
  Network data transfer rate:          661.82 KB/sec
  Aggregate data transfer rate:        186.33 KB/sec
  Objects compressed by:                    0%
  Elapsed processing time:           00:00:04

To archive a directory tree add a terminating slash to the file path and include the -su=yes option to recurse through the subdirectories, as below.

  tsm> ar "C:\My Documents\html-docs\Mac\" -su=yes

Up: Contents Previous: 4. Querying the server Next: 6. Retrieving your data