This is a simple scenario, been bit by it several times in the past, but this time I’d like to hear what others are doing, maybe there’s a better solution than good old hammer approach which I used previously.
So, I have this very important server in restic backup schedule, together with year or so of history (about 30 snapshots). For various important reasons, the server name had to be changed. Now, looking at my nightly restic workflow, I do unlock (just in case), backup, forget --prune with my preferred retention settings. And all is well, except, forget is now working only on snapshots created with new hostname! It seems to completely leave alone old snapshots, so they’re not getting pruned. I find this quite unconvenient.
So, I could fake an old hostname when doing backup, but no, I find that ugly, confusing, and when backups are the topic, no confusion is allowed IMHO, so I’m not going there…
I could start a new repo, this is what I usually did before, then delete the old one after some time, but this time I’d really like to keep what is there, for the whole year, together with new stuff, in the same repo, but also keep my retention setting. From what I understand, this repo will now tend to grow to double size (60 snapshots soon), and that is also not good (if I left everything as it is and don’t care).
The only other thing I see I could do is to manually manage, forget snapshots by snapshot that I deem not needed as time passes by. Based on my retention setting, I’d now delete one specific old snapshot for the next 14 days, then proceed to delete one weekly for the next 8 weeks, and finally delete one monthly snapshots every month. And eventually I’d have to keep that one yearly I have. No, this seems like an awful lot of micro-managing error-prone manual work. Refuse to to that either!
When you rename a host, what are you doing? Is there some magic combination of --hostname or similar switches that solves the above nuissance?
Thanks for any answer!