Class: Kaiser::Cmds::DbLoad
- Inherits:
-
Kaiser::Cli
- Object
- Kaiser::Cli
- Kaiser::Cmds::DbLoad
- Defined in:
- lib/kaiser/cmds/db_load.rb
Instance Attribute Summary
Attributes inherited from Kaiser::Cli
Instance Method Summary collapse
Methods inherited from Kaiser::Cli
all_subcommands_usage, #define_options, #initialize, register, run_command, #set_config, #start_services, #stop_app, #stop_services
Methods included from Kaiser::CliOptions
Constructor Details
This class inherits a constructor from Kaiser::Cli
Instance Method Details
#execute(_opts) ⇒ Object
22 23 24 25 26 |
# File 'lib/kaiser/cmds/db_load.rb', line 22 def execute(_opts) ensure_setup name = ARGV.shift || 'default' load_db(name) end |
#usage ⇒ Object
6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 |
# File 'lib/kaiser/cmds/db_load.rb', line 6 def usage <<~EOS Shuts down the database docker container, *replaces* the database with the backup provided and brings the container up again. The database will be restored from a tarball saved as \`~/.kaiser/<ENV_NAME>/<current_github_branch_name>/<DB_BACKUP_FILENAME>.tar.bz\` Alternatively you can also load it from your current directory. If no database name was provided, the default database stored at \`~/.kaiser/<ENV_NAME>/<current_github_branch_name>/default.tar.bz\` will be used. USAGE: kaiser db_load kaiser db_load DB_BACKUP_FILENAME kaiser db_load ./my_database.tar.bz EOS end |