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

Split backup restore into cli and lib parts + create wrappers for rush ... usage #866

Open
5 tasks
ikusteu opened this issue Oct 25, 2023 · 0 comments
Open
5 tasks
Assignees

Comments

@ikusteu
Copy link
Collaborator

ikusteu commented Oct 25, 2023

Currently we're using rush seed-firestore:<eisbuk|igorice> which are actually two different (but very similar commands) by running node backup-restore (backup-restore being cli.js). The problem with that approach is: we can't pass any arguments, hence the two different commands. I would prefer to be able to run rush seed-firestore -o <igorice|eisbuk> which would then be a single command. Additionally, as mentioned in #865 it would be nice to split the backing up and restoring (seeding) into two different commands and, ideally, I would like to be able to pass some arguments to both (so that we don't have to hard-code each and every variant of each command.

In order for commands to be able to receive arguments, it would make more sense to run them as js scripts, rather than bash commands, therefore, it would be nice to be able to use the backup-restore functionality, but write a wrapper around it (hence the suggestion for the lib side of the package).

Tasks

  • split the functionality (as a lib) and the cli part of the backup restore package
  • create custom script wrappers for pulling the backup from production and seeding the local db (both should be able to accept arguments) - these can be stored in common/scripts/...
  • script for pulling the backup should accept one argument -o or --organization and call to the backup-restore script under the hood
  • script for seeding the db should check the <root>/firestore-backup for data for a given organization and use the data found there
  • if no backup if found in <root>/firestore-backup, it should prompt the caller if they want to pull the latest data from production
@ikusteu ikusteu self-assigned this Oct 25, 2023
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

No branches or pull requests

1 participant