Modify "host" on existing backups


I didn’t fully realise the implications of hosts, paths or tags when I set up my repos, which means forget is doing the wrong thing currently and retaining old backups because the host changed (I changed hostname when I changed distros).

I want to change the host for older backups so that host is the same for all backups in a repo . How can I modify host for existing backups so that forget will not keep backups from xx months ago merely because the hostname changed?


I don’t think you can modify hostname on existing snapshots but you can use --host from now on when running backup. Your solution right now is to run forget --keep-policies --group-by [tag|path|host]. If the path is already the same I’d recommend to use that option; otherwise, you can tag snapshots with the same tag an run --group-by tags your_tag.


Since we have restic dump I’m hoping for a restic import that will take the same JSON structure and create a new object of the corresponding type. Then this type of migration (change host on some snapshots) could be scripted with a restic | jq | restic pipeline.