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

Q: Recommendation of journal to vault? #50

Closed
ghost opened this issue Nov 26, 2013 · 3 comments
Closed

Q: Recommendation of journal to vault? #50

ghost opened this issue Nov 26, 2013 · 3 comments

Comments

@ghost
Copy link

ghost commented Nov 26, 2013

Hi Victor,

Thanks for the tool it does the job quite well.

Though I am wondering what the relation of journal to vault is.

In the warnings [1] you mention that the for each vault you should use only one journal file which makes it a bit "harder" to retrieve single or certain "type" of files. Issue #3 [2] mentioned it already and the solution would be to filter out specific files from the journal.

Still I am wondering why it would not be recommended to have a vault and then different journales for each type of archive inside?

e.g.
Vault: home-1
Archive types: pictures-1, pictures-2, pictures-n, docs-1, docs-2, docs-n, code-1, code-2, code-n, etc.

Having a separated journal (pictures, docs, code) for each archive type within the vault would make retrieval/restore easier and would give you a quick overview of files.

Thanks,
Christian

[1] https://github.com/vsespb/mt-aws-glacier#warnings--must-read-
[2] #3

@vsespb
Copy link
Owner

vsespb commented Nov 26, 2013

Hi.

In the warnings [1] you mention that the for each vault you should use only one journal file

Let's see this warning:

Use one Journal file only with one (same) vault ( more info here and here )

It actually states that 1 JOURNAL should contain files from 1 VAULT.
And does not state that 1 VAULT should not have multiple journals.

i.e.

a) MyJournal.journal containing files from Vault1 and Vault2 is bad.

this case is really bad, it's disaster.
You won't be able to restore/delete files, because mtglacier does not store vault name together with archive_id.
so if you try to restore some archive from MyJournal.journal mtglacier cannot know if this archive from Vault1
or Vault2

a) MyJournal.journal containing files from Vault1 only - is good.

This is recommended workflow for everyone.

c) MyJournal1.journal with files from Vault1 and MyJournal2.journal with files from Vault1 is not so bad and this case
is not mentioned in my warning.

This will work.
But need to be careful.
For example, you sync with MyJournal1.journal+Vault1 and uploaded file1.
file1 is now in Vault1 and in MyJournal1.journal.

Next, you sync MyJournal2.journal+Vault1. If another (or same) file named file1 is about to sync, it will be synced,
as there is no record about file1 in MyJournal2.journal.

Next, in case you loose your journals, you need to restore journal from vault. You will restore NewJournal from Vault1, which
will contain files from both MyJournal1.journal and MyJournal1.journal (and filename file appeared twice).

so in above example, file1 uploaded twice. and if you restore from NewJournal it will be treated as different version
of same file and latest version will be restore (it's not documented yet that it will be latest version).

I think this case (c) is ok if you have different filenames in MyJournal2.journal and MyJournal1.journal (i.e.
different subdirectories to sync) and it's ok to you to see MyJournal2.journal and MyJournal1.journal merged into one
file in case you restore journal from inventory.

Having a separated journal (pictures, docs, code)

yep. but you should be sure that there are no files with same relative path+name in different journals and that
either

  1. your workflow will work if you lost your journals. and restored it in one single journal.
  2. you never lose your journals (i.e. you have backup)

Also, there is other ways to accompilish this:
I) When restore/delete/sync you can filter by name https://github.com/vsespb/mt-aws-glacier#file-selection-options (very powerful feature) - I think that's the right way for your task.
II) just use different vault for pictures and docs etc.

p.s.

Let me know how can make this warning more clear?

@ghost
Copy link
Author

ghost commented Nov 26, 2013

Thank you for your speedy reply and good explanations.

Also, there is other ways to accompilish this:
I) When restore/delete/sync you can filter by name https://github.com/vsespb/mt-aws-glacier#file-selection-options (very powerful feature) - I think that's the right way for your task.
II) just use different vault for pictures and docs etc.

Option 1. seems reasonable and I will consider it.
Option 2. might cause issues in future due to the limitation of 4000 vaults, per region. That's why I would prefer to keep certain types linked to a vault. But you are right that following could be done as well:

Vaults: pictures, docs, code
Archive in pictures: pictures-1_home-1, pictures-2_home-1, pictures-n_home-1
Archive in docs: docs-1_home-1, docs-2_home-1, docs-n_home-1
Archive in code: code-1_home-1, code-2_home-1, code-n_home-1

Let me know how can make this warning more clear?

Well now it's clear. :) You could rephrase it to Use a Journal file only for the same vault. (more info here and here)

Thanks again and I'll close this "issue"

@ghost ghost closed this as completed Nov 26, 2013
vsespb added a commit that referenced this issue Nov 26, 2013
@vsespb
Copy link
Owner

vsespb commented Nov 26, 2013

ok, thanks, I updated README.

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

No branches or pull requests

1 participant