◐ Shell
clean mode source ↗

gh-85253: Exclude `__pycache__` directories from backups using `CACHEDIR.TAG` by jstasiak · Pull Request #21060 · python/cpython

…R.TAG

This helps to prevent bloating backups with unwanted (possibly
frequently changing, if __pycache__ directories are removed and
recreated) files.

Granted, one can add __pycache__ directory to their
backup-tool-of-choice exclusion list, but those lists are ever
growing and maybe it'd be good to help the tools and the users.

See https://bford.info/cachedir/ for more information about the
specification – it's supported by Borg, restic, GNU Tar and attic
out of the box, other pieces of software (like rsync, Bacula and
rdiff-backup) can be made to use it (partially, just the existence of
the tag file is used, not its content)

merwok

merwok

Co-authored-by: Éric Araujo <merwok@netwok.org>

@jstasiak

@brettcannon brettcannon changed the title bpo-41081: Exclude __pycache__ directories from backups using CACHEDIR.TAG gh-85253: Exclude __pycache__ directories from backups using CACHEDIR.TAG

Dec 18, 2023

@jstasiak jstasiak mannequin mentioned this pull request

Apr 10, 2022

RazerM

AA-Turner

Co-authored-by: Frazer McLean <frazer@frazermclean.co.uk>
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>