Class: Heighliner::Cmds::DbSave
- Inherits:
-
Heighliner::Cli
- Object
- Heighliner::Cli
- Heighliner::Cmds::DbSave
- Defined in:
- lib/heighliner/cmds/db_save.rb
Instance Attribute Summary
Attributes inherited from Heighliner::Cli
Instance Method Summary collapse
Methods inherited from Heighliner::Cli
all_subcommands_usage, #define_options, #initialize, register, run_command, #set_config, #start_services, #stop_app, #stop_services
Methods included from Heighliner::CliOptions
Constructor Details
This class inherits a constructor from Heighliner::Cli
Instance Method Details
#execute(_opts) ⇒ Object
19 20 21 22 23 |
# File 'lib/heighliner/cmds/db_save.rb', line 19 def execute(_opts) ensure_setup name = ARGV.shift || 'default' save_db(name) end |
#usage ⇒ Object
6 7 8 9 10 11 12 13 14 15 16 17 |
# File 'lib/heighliner/cmds/db_save.rb', line 6 def usage <<~EOS Shuts down the database docker container, backs up the database and brings the container back up. The database will be saved as a tarball to \`~/.heighliner/<ENV_NAME>/<current_github_branch_name>/<DB_BACKUP_FILENAME>.tar.bz\` Alternatively you can also save it to your current directory. USAGE: heighliner db_save DB_BACKUP_FILENAME heighliner db_save ./my_database.tar.bz EOS end |