As with the Kubernetes sidecar guide, this section covers a particular operationalization of Datamon at One Concern wherein we use the program along with some auxilliary programs, all parameterized via a shell script and shipped in a Docker image, in order to periodically backup a shared block store and remove files according to their modify time.
The docker image is called gcr.io/onec-co/datamon-datamover
and is tagged with
versions just as the Kubernetes sidecar, v<release_number>
, where v0.7
is the first
tag that will apply to the Datamover.
The datamover
image contains two shell wrappers, backup
and datamover
.
Both fulfill approximately the same purpose, backing up files from an NFS share
to datamon. The main difference is that backup
uses standard *nix utils,
while datamover
uses an auxilliary util maintained alongside datamon.
Their respective parameters are as follows:
-d
backup directory. required if-f
not present. this is the recommended way to specify files to backup from a kubernetes job.-f
backup filelist. list of files to backup.-u
unlinkable filelist. when specified, files that can be safely deleted after the backup are written to this list. when unspecified, files are deleted bybackup
.-t
set totrue
orfalse
in order to run in test mode, which at present does nothing more than specify the datamon repo to use.
-d
backup directory. required.-l
bundle label. defaults todatamover-<timestamp>
-t
timestamp filter before. a timestamp string in system local time among several formats, including<Year>-<Month>-<Day>
as in2006-Jan-02
<Year><Month><Day><Hour><Minute>
as in0601021504
<Year><Month><Day><Hour><Minute><second>
as in060102150405
defaults to090725000000
-f
filelist directory. defaults to/tmp
and is the location to writeupload.list
, the files that datamon will attempt to upload as part of the backupuploaded.list
, the files that have been successfully uploaded as part of the backupremovable.list
, the files that have been successfully uploaded and that have a modify time before the specified timestamp filter
-c
concurrency factor. defaults to 200. tune this down in case of the NFS being hammered by too many reads during backup.-u
unlink, a boolean toggle. whether to unlink the files inremoveable.list
as part of thedatamover
script. defaults to off/false/not present.