User guide
All options
Create data.csv file
camrcs requires a data.csv file that contains the information for all directories that need to be archived:
id |
crsid |
project_dir |
date_up |
date_down |
temp_path |
target_dir |
remote_dest_dir |
chunk_size |
exclude_dir |
md5sum_up |
md5sum_down |
download_dir |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
1 |
<CRSID> |
<project dir on RCS> |
<path to create tar file> |
<directory to archive> |
test |
2G |
<directory to exclude from archiving> |
<directory to retrieve archive> |
An empty data.csv file can be generated before first use:
$ cd path/to/storefile
$ camrcs up --csv
Creating remote destination directory on RCS
Due to an older version of rsync running on the RCS server, it is currently not possible to create a multiple level path set by remote_dest_dir in data.csv if at least two levels of this path do not yet exist.
In this case, the user has to create this path manually using sftp.
For example, to store data in the new path data/exp1 run:
$ sftp <crsid>@rcs.uis.cam.ac.uk
$ Password:
$ Connected to rcs.uis.cam.ac.uk.
$ cd rcs-<PIs CRSID>-<Project Name>
$ mkdir data
$ mkdir data/exp1
$ quit
Note
If remote_dest_dir is a path with only one level or when only the lowest level does not yet exist, then this step can be skipped.
Archive data to RCS
To archive data to RCS:
$ cd path/to/data.csv
$ camrcs up
camrcs will then proceed to archive all directories specified in data.csv.
The workflow consists of the following steps:
Creation of compressed tar file of target directory
- Generation of md5sum of tar file
This can be used to check data integrity when retrieving the archive from RCS
- Splitting of tar file into multiple parts
The split file size can be set in data.csv under the chunk_size header
Uploading of split tar file to RCS
Retrieve data from RCS
To retrieve data from RCS:
$ cd path/to/data.csv
$ camrcs down -t 1
The value of the -t flag should correspond to the id header in data.csv.
The workflow consists of the following steps:
Retrieval of split archive files from RCS
Concatenation of split archive files into one archive file
Generation of md5sum of assembled tar file
Comparison of md5sums (uploaded data vs retrieved data)
Extraction of compressed archive file to destination directory
Removal of split archive files