I try to write the script that automate trigerring a snapshot or just cleaning up last or all snaphosts. I use the documentation https://apple.github.io/foundationdb/backups.html#fdbbackup-command-line-tool
Starting of the backup works, but i have issue with cleaning up unnecessaries backups.
I run list to get known my backups:
$ fdbbackup list -b file:///var/lib/foundationdb/data/disk1/backup/
file:///var/lib/foundationdb/data/disk1/backup/backup-2020-01-22-17-37-05.077074
file:///var/lib/foundationdb/data/disk1/backup/backup-2020-01-23-12-24-08.278906
and then i try delete command. It works in most cases but sometimes i get error and i cannot delete a snapshot with fdbbackup tool. Examples:
$ fdbbackup delete -d file:///var/lib/foundationdb/data/disk1/backup/backup-2020-01-22-17-37-05.077074
Deleting file:///var/lib/foundationdb/data/disk1/backup/backup-2020-01-22-17-37-05.077074...
ERROR: Backup Container URL invalid
Fatal Error: Backup Container URL invalid
$ fdbbackup delete -d file:///var/lib/foundationdb/data/disk1/backup/backup-2020-01-23-12-24-08.278906
Deleting file:///var/lib/foundationdb/data/disk1/backup/backup-2020-01-23-12-24-08.278906...
ERROR: Backup Container URL invalid
Fatal Error: Backup Container URL invalid
Paths of the backups are fine:
$ ls /var/lib/foundationdb/data/disk1/backup/*
/var/lib/foundationdb/data/disk1/backup/backup-2020-01-22-17-37-05.077074:
kvranges
/var/lib/foundationdb/data/disk1/backup/backup-2020-01-23-12-24-08.278906:
kvranges
I see that fdbbackup 6.2 have some nice option - cleanup but now i have to use 6.1 versien, where this option is not available.
I don’t have idea, what i do wrong and how can i remove backup using fdbbackup instead rm command. Anyone knows?