Directly working with a restic repository
A cback repository consists of a S3 bucket containing a restic repository, targeted by cback jobs. cback
allows for the mounting and and manipulation of a given repository, with the restic
tool itself.
This can be done administratively from any worker node with a valid cback configuration. cback can do this in two manners:
- Indirect: cback spawns a shell with a prepared environment for providing restic targeting the s3 backend
cback shell <backup-job-id>
- Local mount: a ditto of the above with addition of mounting the repository locally on the given worker node
cback shell <backup-job-id> --mount
The mount will be under /tmp, and the exact location is provided by cback once inside the shell. For convenience, the env varialbleRESTIC_MOUNT
is assigned, containing the mount point of the restic repository. If using---mount
, cback will automatically unmount the repository after termination of the restic shell session.
[warningâť—] This feature is intended primarily for debugging and examination of files within a snapshot by a cback operator prior to a restore, great care should be taken when working with a restic repository directly as restic commands may further affect backup/prune/restore agent processes outside of the shell. Ideally, a workload targeting a repository should be disabled if you intend to actively utilise restic beyond investigation.
Bellow is an example of the cback shell in practice:
$ cback backup shell 1 --mount
Mounted repository in /tmp/tmp5l4lskr5
Spawing a shell with a configured environent for the repository s3:https://s3-fr-prevessin-1.cern.ch/manila-devstack-70e1c17f-a565-4f48-9d26-c2c550c4f12f
cback (root) > ls /tmp/tmp5l4lskr5
hosts ids snapshots tags
cback (root) > echo $RESTIC_MOUNT
/tmp/tmp5l4lskr5
cback (root) > restic snapshots
repository f2565384 opened (version 2, compression level auto)
ID Time Host Tags Paths
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
c197456f 2024-05-07 15:29:47 devstack-cback-71abd95b7d.cern.ch 38b976a3-a007-4a24-9c18-ac1788357ce9 /cephfs-devstack/volumes/_nogroup/8dabc902-5d08-475f-8738-adef46510c60/f7139a00-1be9-4314-a6f3-7b95cde1070e
d6fa8335 2024-05-07 17:12:51 devstack-cback-71abd95b7d.cern.ch 88006a10-90ed-42f4-b402-ba14b9f6ec2d /cephfs-devstack/volumes/_nogroup/8dabc902-5d08-475f-8738-adef46510c60/f7139a00-1be9-4314-a6f3-7b95cde1070e
d25e8eb8 2024-05-07 18:02:58 devstack-cback-71abd95b7d.cern.ch afe455f1-5dc1-4133-8178-a008b57fcf4d /cephfs-devstack/volumes/_nogroup/8dabc902-5d08-475f-8738-adef46510c60/f7139a00-1be9-4314-a6f3-7b95cde1070e
9b756614 2024-05-07 18:05:18 devstack-cback-71abd95b7d.cern.ch 62e065b0-0abf-4b45-a7ee-4f4ba4209f2d /cephfs-devstack/volumes/_nogroup/8dabc902-5d08-475f-8738-adef46510c60/f7139a00-1be9-4314-a6f3-7b95cde1070e
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
4 snapshots
cback (root) > exit
exit
Exited from the restic shell