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:
-dbackup directory. required if-fnot present. this is the recommended way to specify files to backup from a kubernetes job.-fbackup filelist. list of files to backup.-uunlinkable filelist. when specified, files that can be safely deleted after the backup are written to this list. when unspecified, files are deleted bybackup.-tset totrueorfalsein order to run in test mode, which at present does nothing more than specify the datamon repo to use.
-dbackup directory. required.-lbundle label. defaults todatamover-<timestamp>-ttimestamp 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 in060102150405defaults to090725000000
-ffilelist directory. defaults to/tmpand 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
-cconcurrency factor. defaults to 200. tune this down in case of the NFS being hammered by too many reads during backup.-uunlink, a boolean toggle. whether to unlink the files inremoveable.listas part of thedatamoverscript. defaults to off/false/not present.