-
Notifications
You must be signed in to change notification settings - Fork 57
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
purge-vault filtering doesn't work as expected #106
Comments
I use the following options, after removing the file locally and from the journal: |
Hello. See docs: |
That's sad. But when making backups opposite can happen, one can include and exclude several files, and default rule will work for others. If default rule would be EXCLUDE, other files won't be backed up. So at some point i've choosen to make default rule INCLUDE. |
also, see |
Although tool is primarily designed for syncing local dir with a vault, I'm always using it for uploading individual archives from different dirs so "sync" will not work for me... IMHO INCLUDE rule is much more dangerous then EXCLUDE, user can fix "files not backed up" issue any moment, while "all files in vault has been deleted" issue is unrecoverable. I think base form of "delete" operation must be as simple as with local file-system, something like And btw - how to delete a single file by name, if default rule is INCLUDE everything? |
In your case
Yes, there should be commands to work with single file, upload-file delete-file etc. Currently not implemented. Things like
That's questionable. One can say that usually tool is used for backup, and operation is automated. And deletion usually not automated, but performed manually (well, except when rotation implemented, then deletion is automated too). Then "all files in vault has been deleted" can be easy fixed by reuploading files. Because that's just a backup, not original copy. And missing files when doing automated backup is usually unnoticable thus more danger. Anyway, when I designed this I analyzed several tools which work with group of files and its filtering options and come to conclusion that default INCLUDE is better, maybe I don't remember now all details which lead to this decision, For example duplicity/rsync default is INCLUDE too. http://duplicity.nongnu.org/duplicity.1.html
http://linux.die.net/man/1/rsync
Also note that I will be unable to change this without breaking backward compatibility. |
Agree with everything, except how it is covered in docs:
That's what lead me to make a mistake. Formally the statement is right, when you also know however that expression I would replace this part in docs with group of examples (something like that):
UPD: just realized that "--filter" part in docs relate to all commands, not just deletion... Anyway, I think it's worth to create "Delete files" section and put details there. |
Supposedly I'm doing something wrong, but at least things are not working as expected...
I've uploaded few individual files into the vault like that:
./glacier/mt-aws/mtglacier upload-file --config ./glacier/mt-aws/glacier.cfg --vault qqq --journal ./glacier/mt-aws/qqq.journal --partsize 256 --filename ./foo.txt --set-rel-filename foo.txt
./glacier/mt-aws/mtglacier upload-file --config ./glacier/mt-aws/glacier.cfg --vault qqq --journal ./glacier/mt-aws/qqq.journal --partsize 256 --filename ./test.txt --set-rel-filename test.txt
Now I want to delete 'test.txt' from the vault. The problem is: whatever I put into "--filter" - it always results in deleting ALL files in the vault:
./glacier/mt-aws/mtglacier purge-vault --config ./glacier/mt-aws/glacier.cfg --vault qqq --journal ./glacier/mt-aws/qqq.journal --filter '+test.txt'
PID 57899 Started worker
PID 57900 Started worker
PID 57901 Started worker
PID 57902 Started worker
PID 57901 Deleted test.txt archive_id [mmAc8t54R3GRQOe5L5nxCFmZlVqjdVsPVGMjua63zgn0siJqrRZ1YDZB1GGxYCskLaMDsdwc5E6fswDQ-XBUZaUGp7eqpfw7jJOpQaTn2yvDU-zCo2IPilr0Ow180t9PnfMnGdC4pA]
PID 57899 Deleted foo.txt archive_id [s_bgL356OdJJgCQ8b2Dfsrqiu09RLpeLfxtTaqIaSbrm-mZBFhkZFRit2OiO5oVmRz6d7gcRIjwyLUVUQi5AsvWWFp93BGNHdA_ShyKsyR9AeawzJBm9ySSM5iEt-8PnDkQx-71Ewg]
OK DONE
I've already lost one of my vaults completely lol, and still have no idea how to delete a single file...
The text was updated successfully, but these errors were encountered: