Newbie Question: Deleting accidental folder from repo

I did a search and saw questions about deleting repos but not about a specific folder or a series of days of revisions from a repo. But I may not know the correct terms to search.

I have a backup folder (“BACKUP”) as an Unraid share and Duplicacy Web running in a docker in Unraid. I’ve just been manually adding files to the BACKUP folder and Duplicacy packs them into the BACKUP_REPO. I only have that one local repo and then a BACKUP_CLOUD storage on Backblaze B2. I also have another backup task that copies the Unraid_System_Backups folder to the same single repo. Anyway, this seems to have all been working fine for 6-8 months and I’ve tested and restored some files.

The problem is that I am finally getting around to getting my Windows Desktop to auto backup to “/BACKUP/Win_Desktop_Backup” which is a brand-new folder I created yesterday. I started fooling around with the built-in Win10 “File History” tool and when I couldn’t get that to work (a Win10 issue, maybe a corrupt user profile?), I tried to get the old Win7 backup tool (which is still in Win10) to work. I know that I should have stopped the Duplicacy docker but I got all caught up in the Windows problems and then some work issues.

Today I realized that the Win7 tool had failed in the background yesterday but not before creating 260-ish gb of unnecessary backups and system image files, which I immediately deleted and turned off all Win backup tools and aborted+unscheduled the copy of BACKUP_REPO to BACKUP_CLOUD, which was still running.

So my question is: Is there any way to undo this 260 gb of trash that went into the repo? Not very much got uploaded to BACKUP_CLOUD, so if there’s a gb or 10 sitting in my B2 bucket forever, that’s fine. I’d be fine with walking all my backups back in time to the day before yesterday.

My prune options are “-keep 7:30 -keep 1:7 -a” for both BACKUP_REPO and BACKUP_CLOUD.

  • Your first step is to remove the “trash” in your backup folder and make sure that it doesn’t get created again (or by excluding that folder from your backup with the filter file).
    Then I would run the backup job again to create another version that does not contain those trash files (so you do have a current backup).
  • Next step is to delete the specific revisions of the backup in BACKUP_REPO that contain the trash files with the “prune” command, using the “-r” option. Use the check command to see which versions are affected, you should be able to tell by the size of new files.
  • After that use the check command to see, if any full version was copied to the BACKUP_CLOUD. If so, use the prune command in a similar fashion to delete those versions. Since you used copy to transfer the data, they have the same version number.
  • Then run the copy job to get the latest version into BACKUP_CLOUD (again to have the most recent backup there).
  • Finally do the clean up: Run the prune command with the “-exhaustive” option on both BACKUP_REPO and BACKUP_CLOUD, so the chunks that were created/copied, but aren’t part of an existing version anymore, get deleted.
3 Likes

Thank you I wasn’t sure if prune could be used this way. I’m going to read up more on the CLI commands and try this.