Added scripts to run a backup between tiled servers running different versions#63
Open
jmaruland wants to merge 1 commit intoAI-multimodal:mainfrom
Open
Added scripts to run a backup between tiled servers running different versions#63jmaruland wants to merge 1 commit intoAI-multimodal:mainfrom
jmaruland wants to merge 1 commit intoAI-multimodal:mainfrom
Conversation
danielballan
approved these changes
Sep 6, 2023
Contributor
danielballan
left a comment
There was a problem hiding this comment.
Great work! I like the docstrings. This is really solid.
I left a couple very minor comments, just to take the opportunity to teach some small things.
|
|
||
| """ | ||
|
|
||
| if not os.path.exists("files/"): |
Contributor
There was a problem hiding this comment.
There is an optional argument to say "Create the directory only if it doesn't already exist." https://docs.python.org/3/library/os.html#os.makedirs
| if not os.path.exists("files/"): | ||
| os.mkdir("files/") | ||
|
|
||
| for key in c['dataset'].keys(): |
Contributor
There was a problem hiding this comment.
This is perfectly fine. It's useful to know that iterating through a dict-like object iterates through its keys, so you can just write:
Suggested change
| for key in c['dataset'].keys(): | |
| for key in c['dataset']: |
Contributor
|
Sorry, I missed this months ago. Is it still valid? |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR adds script that allows running a backup from our instance of aimmdb in
https://aimm.lbl.gov/apitohttps://tiled-demo.blueskyproject.io.The first instance was running in a much older version of tiled and it was not compatible to try to connect to both instances using one environment with the same tiled client. the solution includes two steps: 1) downloading all the data to the local machine as json files and 2) reading the json files and uploading the data to the new site.