[feature] Create CACHEDIR.TAG
files in media paths that need not be backed up
#3658
Labels
enhancement
New feature or request
good first issue
Good for newcomers
storage/media
Issues related to how we store and serve media
Is your feature request related to a problem ?
https://docs.gotosocial.org/en/latest/admin/backup_and_restore/#borgmatic describes a method to generate patterns for one specific backup software. I would like to propose a more general solution that various backup softwares can support (the one I use does).
Describe the solution you'd like.
Create a file with the exact case-sensitive filename
CACHEDIR.TAG
and the exact contentSignature: 8a477f597d28d172789f06886806bc55
(newline at the end apparently not required, but you can add one and a comment) in each directory whose contents (files and subdirectories) need not to be backed up. (This has no unexclusion method, it’s a recursive exclusion, so I think it needs to be in places like/srv/GtS/01J2PFJKS8KXRY41CV329N5VSK/CACHEDIR.TAG
for remote accounts.)On filesystems supporting hardlinks, these files ought to be hardlinked together so only one inode and data block are used (with over 8k entries in my media storage alone, this is worth it).
On object storage, this is not necessary, do it on real filesystems only.
Describe alternatives you've considered.
Either have too-large backups with redundant data or remember to manually flush remote media before backing up.
Additional context.
No response
The text was updated successfully, but these errors were encountered: