I’m currently testing out restic am came by a behaviour that I took for “by design”, but was encourage on Twitter to share here anyways.
I’m using restic-tools to easily backup into a S3 (Minio) Bucket. In addition to the file backup I have setup a
local.post job to dump a mysql database utilising the --stdin option.
Repeated backup jobs looked fine, so as a next step I wanted to mount the backup to inspect it. Having mounted I saw the backup set of my host in
hosts/hostname and looking at the “latest” I was only able to find the sql dump.
I’ve “worked around” this by now setting an alternate hostname when doing the mysql dump.
Steps to reproduce:
- download and configure restic-tools
- do a local backup with
backup example local
( mount backup and you will find the file backup in the latest folder)
- run an additional stdin, like
mysqldump --defaults-extra-file=/etc/mysql/debian.cnf --single-transaction kopano | backup bunsen backup --stdin --stdin-filename kopano.sql
( - mount backup and you will find only the sql file in the latest folder)
Expected behaviour (?):
- my initial expectation was to find a combined view of both backup just in the latest folder (since the
snapshotscommand knows the original path). But seeing that latest is a symlink to the last run job the current behaviour makes sense as well.