This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: Exclude __pycache__ directories from backups using CACHEDIR.TAG
Type: enhancement Stage: patch review
Components: Library (Lib) Versions: Python 3.10
process
Status: open Resolution:
Dependencies: Superseder:
Assigned To: Nosy List: eric.smith, jstasiak
Priority: normal Keywords: patch

Created on 2020-06-22 19:39 by jstasiak, last changed 2022-04-11 14:59 by admin.

Pull Requests
URL Status Linked Edit
PR 21060 open jstasiak, 2020-06-22 19:47
Messages (2)
msg372109 - (view) Author: Jakub Stasiak (jstasiak) * Date: 2020-06-22 19:39
It'd be nice of __pycache__ directories didn't pollute backups. 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.

There's a Cache Directory Tagging Specification[1] which some backup tools like Borg, restic, GNU Tar and attic use out of the box (well, with a switch) and other tools (like rsync, Bacula, rdiff-backup and I imagine others) can be made to use it with a generic exclude-directories-with-this-file-present option (partially, just the existence of the tag file is used, not its content).


I wasn't sure what to select in Components, so I went with Library.
[1] https://bford.info/cachedir/
msg372113 - (view) Author: Eric V. Smith (eric.smith) * (Python committer) Date: 2020-06-22 20:54
To spoil it for other readers: the linked page says to create a file named CACHEDIR.TAG with a specific first line.
History
Date User Action Args
2022-04-11 14:59:32adminsetgithub: 85253
2020-06-22 20:54:25eric.smithsetnosy: + eric.smith
messages: + msg372113
2020-06-22 19:47:20jstasiaksetkeywords: + patch
stage: patch review
pull_requests: + pull_request20231
2020-06-22 19:39:42jstasiakcreate