-
Notifications
You must be signed in to change notification settings - Fork 16
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Prune all pruneable sessions of all backups #46
Comments
@tlaurion In the beta1 (wyng) branch I changed the date-time code so that if you specified a date-time later than the latest session, it wouldn't skip the volume but instead include the specified sessions (minus the latest). So this should now work:
BTW, I'm now up to |
Ref commit 36cb98d |
@tlaurion To make it easier, here is a working example that uses the current date-time whenever its run:
|
@tasket : I transitioned away of sparsebak by doing as described in precedent post in dom0: Then took a less important backup and did, prior to looping in all preexisting backup:
Then: |
Just realized I havent't moved sparsebak backup directory on destination disk to Now I get:
|
Hmmm. Even trying to delete that backup tries to continue resuming past operation on that volume. Any insight? |
Yeah, that's why I suggested doing a What's going on is that the prune op crashed at a point I don't cover yet in recovery sanity tests. And its not yet sophisticated enough to see that it has already re-tried the op. |
@tlaurion If you look at the volume's dir on dest, and there is a "merge" subdir with contents in it, then its part-way into the move/remove operations. The data won't come back out of that merge dir until the op is complete. There may also be a "merge.log" in /var/lib/wyng.backup/default/volname. If you're really stuck with this, I can recreate the problem by renaming my dest archive and then trying to start a prune op. |
I tried to recreate the problem with:
However, the in_process flag did not take and there was no attempt to resume the prior op. |
What needs to be done to discard merge attempt in case it tries to resume operation? Delete the whole backup, or there is something that can be attempted? |
@tlaurion If you're importing from the archive that had the prune interruption (and the in_process status), you may still have a bit of detective work to do before the import. Let me know if on the dest volume there is a 'wyng.backup/default/in_process' file and/or a 'wyng.backup/default/VOLNAME/merge*' dir. I think beta3 can recover the situation now, but I only did a few tests. Here is the decision matrix: In the case there is no 'merge' or 'merge-init' dir, the merge procedure will be aborted and the in_process status cleared. If there is a 'merge-init' dir, it will try to return the session data files to their original locations before aborting and clearing in_process. In the case there is a 'merge' dir, it will have to try to complete the merge procedure. (If this fails for some reason, it can be rescued with normal shell commands like cp, rm, etc. I can provide details.) |
@tlaurion There is a bug in merge that I'm dealing with now, so please hold off pruning with beta3 until I post a fix. |
@tlaurion OK, that bug is now fixed in beta3. |
[user@backup QubesOS]$ cd wyng.backup/default/
|
Since the problematic volume was vm-build-x230-coreboot-48-private, I also deleted that non-completed pruned session. Same result when trying to arch-init with --from in #50 |
This is a feature request. Hacked my way around it with this to recover 200GB of unneeded backups (last backup session not being pruneable)
sudo ~/sparsebak/sparsebak.py list |sort|tail -n +7 | while read appvm; do echo $appvm:; sudo ~/sparsebak/sparsebak.py list $appvm|tail -n -4|head -n +1|awk -F " " '{print $(NF-1)}'| while read last_deleteable_backup; do echo $last_deleteable_backup|sudo ~/sparsebak/sparsebak.py -u prune $appvm --all-before --session $last_deleteable_backup; done; done
The text was updated successfully, but these errors were encountered: