-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Description
I need to include support for pushing / downloading a local-db version to/from google drive
Requirements:
- The script must expose two commands:
pushandpull. - As part of config, we need to put a setting where local-db binary is. It can be provided as setting or as a var when invoking the command.
- At the moment only Google Drive should be supported, but we can leave it open for the future (ex: OneDrive).
- I think pydrive2 can be used for google drive; ensure invoke whatever is required to authenticate against your account
Behavior:
-
push [VERSION] [-o]:- Run
./local-db stash VERSION. - If VERSION is omitted, use today’s date in format
YYYY-mm-DD. - The stash produces a binary file named
local-db-VERSION.bin. - Upload that file to Google Drive inside the
/datastorefolder. - If
-ois passed, overwrite any existing file with the same name.
- Run
-
pull [VERSION]:- If VERSION is omitted, download the latest backup from
/datastore. - If VERSION is provided, download that specific file (
local-db-VERSION.bin). - Save it locally and run
./local-db restore VERSION.
- If VERSION is omitted, download the latest backup from
Other requirements:
- Fail fast if commands or files are missing.
- Script must be auditable, modular, and portable.
- Keep comments minimal, only if strictly necessary.
- It should be another command, following same format as the ones we have.
- As usual, add tests to cover as possible and ensure code is being compiled and executed without issues.
Copilot
Metadata
Metadata
Assignees
Labels
No labels