Skip to content

Implement --exclude-if-present #142

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

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

wavexx
Copy link

@wavexx wavexx commented Dec 7, 2014

Add a new --exclude-if-present command-line flag to attic create. If
specified, directories containing the specified tag file will be excluded from
the backup. The flag can be repeated to ignore more than a single tag file,
irregardless of the contents.

Tests included. See issue #128.

Add a new --exclude-if-present command-line flag to ``attic create``.  If
specified, directories containing the specified tag file will be excluded from
the backup. The flag can be repeated to ignore more than a single tag file,
irregardless of the contents.
We also add --keep-tag-files to keep in the archive the root directory and the
tag/exclusion file in the archive.
@wavexx wavexx force-pushed the exclude_if_present branch from 759901c to f61e22c Compare December 15, 2014 11:30
@wavexx
Copy link
Author

wavexx commented Dec 15, 2014

In the last commit I also implement '--keep-tag-files', which is akin to the last-slash rule of the exclude paths. It includes the root of the directory and the tag file itself, without including anything else.

It's very helpful to restore paths which are meant to be persistent and/or know which directories were excluded due to --exclude-caches/--exclude-if-present a posteriori.

@wavexx
Copy link
Author

wavexx commented Dec 15, 2014

Looks like the CI build failed for an unrelated reason on python 3.3

@madaboutcode
Copy link

Can we try to trigger this build once more? It clearly looks like it failed for an unrelated reason.
I would really like to see this feature in attic. I work on a lot of random projects and this would let me backup my entire project directory while tagging certain folders to be excluded.

@wavexx
Copy link
Author

wavexx commented Jan 13, 2015

On 01/13/2015 05:37 AM, Ajeesh Mohan wrote:

Can we try to trigger this build once
more
? It clearly looks like it
failed for an unrelated reason. I would really like to see this
feature in attic. I work on a lot of random projects and this would
let me backup my entire project directory while tagging certain
folders to be excluded.

I've been using this (and the other 2 PR) as part of my daily backups
since the PR request was made.

I'm open to rework the patch, so please ask if there's any question.

@ThomasWaldmann
Copy link
Contributor

If the local unit test succeed, I suggest your trigger the travis build again by doing some minimal changeset. E.g. you could add docs about your change.

@hoxu
Copy link

hoxu commented Aug 31, 2015

I hope this is still being worked on. I would really like to see this feature, current exclude options are not sufficient.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants