Is there a way to selectively remove a file from file-based backups?
Scenario: You find a file on a client in plain text that really should be encrypted. This file has been backed up for a while via urbackup file-based backups in plain text. Can you remove all traces of this single file from all existing file-based backups, leaving everything else that was backed up intact?
(I realize that if this plain text file was backed up as part of an image backup, you are screwed)
I assume you know the full path for the file… Which means you could do a search for it under the specific client’s backup folder, and replace it with either an empty file or the correctly encrypted one.
The exact process would depend on the server OS and filesystem.
Yeah, with btrfs it is a bit annoying, because it sets the volumes read-only. So you have to set them read-write, remove the file, then set it read-only again.
Idk if it would even work with ZFS snapshots…
Thanks for the replies. I have been out of town, offline, for a while so I apologize for my late acknowledgement of your responses.
Could you clarify for my, if i had Urbackup on Windows and want to granularily delete some files from backups i have to find and delete them in backup folder you mean? Should i run cleanup.bat or cleanup_database.bat or something after? Would backup work correctly after i delete files from it?
Before I go on - general rule is never mess with storage for backup systems like this… That said, it’s your data so here we go
You mean the server is Windows? So the storage is NTFS?
If they’re file backups not images, you should be able to search for the offending files and see them. Once you know where they all are, you’ll want to replace them with blank files (or some other safe data if you want a working file there for restore) of the same name. You shouldn’t need to do anything else as long as the files still exist.
I would not recommend this if there are more than a few files or backups, though. You’ll be manually overwriting files in your backups which can be hazardous. If there are more than a few files, or you have entire folders to deal with, it may be difficult to do, and you should consider things like what are the backup policy requirements, how valuable is the good data you may damage in the process, how bad is the bad data in comparison, etc.