Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add possibility to exclude files/directories from versioning #8678

Open
Frank071 opened this issue Nov 17, 2022 · 1 comment
Open

Add possibility to exclude files/directories from versioning #8678

Frank071 opened this issue Nov 17, 2022 · 1 comment
Labels
enhancement New features or improvements of some kind, as opposed to a problem (bug)

Comments

@Frank071
Copy link

The versioning system in SyncThing is great, but sometimes one does not want to version everything. In my case it is a Thunderbird profile folder that (for backup purposes) is sync'd as part of a larger parent directory. For that directory and (most of) its subdirectory, versioning is in place. But for the TB Profile directory this results in a lot of space being consumed. Perhaps not the best reason for this feature, but it is a reason...
That feature would be that you can specify (in some way) that some directories need not by versioned, although sync'd. I see roughly two ways of dealing with this: either a file like .stignore containing regex patterns, or the (probably) more simpler approach of allowing the user to create a directory inside the .stversions directory with a marker signalling that that everything in that directory needs not be versioned. Something like:

syncdir--+
         |-.stversions--+
         |              |-dir_a--+
         |              |        |-file_1.221117...
         |              |        |-...
         |              |
         |              |-dir_b--+
         |              |        |-.stdisable_versions
         |              |   
         |              |-dir_c--+
         |              |        |-file_1.221021....
         ...            ...      ...

I could see this happen in lib/versioner/util.go where archiveFile does a check if the directory to move the versioned file to exists and if not, creates it. That could be prepended by a check for the existence of .stdisable_versions in any of the parent directories. I have, unfortunately, not enough knowledge of the Go language to prepare a code block for this.

@Frank071 Frank071 added enhancement New features or improvements of some kind, as opposed to a problem (bug) needs-triage New issues needed to be validated labels Nov 17, 2022
@tomasz1986
Copy link
Contributor

Not sure if feasible, but having separate ignore patterns just for versioning could be quite useful. At the moment, you can utilise external versioning with your own script to achieve what you want here.

@calmh calmh removed the needs-triage New issues needed to be validated label Dec 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New features or improvements of some kind, as opposed to a problem (bug)
Projects
None yet
Development

No branches or pull requests

3 participants