Sha256: 6ce4b41bf035b69764b0628a965103ba0edeecad36867579662feec258364da1

Contents?: true

Size: 660 Bytes

Versions: 18

Compression:

Stored size: 660 Bytes

Contents

module Brightbox
  command [:sql] do |product|
    product.command [:instances] do |cmd|
      cmd.desc I18n.t("sql.instances.snapshot.desc")
      cmd.arg_name "[instance-id...]"
      cmd.command [:snapshot] do |c|
        c.action do |_global_options, _options, args|
          raise "You must specify SQL instance IDs to snapshot" if args.empty?

          servers = DatabaseServer.find_or_call(args) do |id|
            raise "Couldn't find an SQL instance with ID #{id}"
          end

          servers.each do |server|
            info "Creating snapshot for #{server}"
            server.snapshot
          end
        end
      end
    end
  end
end

Version data entries

18 entries across 18 versions & 1 rubygems

Version Path
brightbox-cli-5.0.0 lib/brightbox-cli/commands/sql/instances_snapshot.rb
brightbox-cli-5.0.0.rc2 lib/brightbox-cli/commands/sql/instances_snapshot.rb
brightbox-cli-5.0.0.rc1 lib/brightbox-cli/commands/sql/instances_snapshot.rb
brightbox-cli-5.0.0.alpha lib/brightbox-cli/commands/sql/instances_snapshot.rb
brightbox-cli-4.8.0 lib/brightbox-cli/commands/sql/instances_snapshot.rb
brightbox-cli-4.7.0 lib/brightbox-cli/commands/sql/instances_snapshot.rb
brightbox-cli-4.6.0 lib/brightbox-cli/commands/sql/instances_snapshot.rb
brightbox-cli-4.5.0 lib/brightbox-cli/commands/sql/instances_snapshot.rb
brightbox-cli-4.5.0.rc1 lib/brightbox-cli/commands/sql/instances_snapshot.rb
brightbox-cli-4.4.0 lib/brightbox-cli/commands/sql/instances_snapshot.rb
brightbox-cli-4.3.2 lib/brightbox-cli/commands/sql/instances_snapshot.rb
brightbox-cli-4.3.1 lib/brightbox-cli/commands/sql/instances_snapshot.rb
brightbox-cli-4.3.0 lib/brightbox-cli/commands/sql/instances_snapshot.rb
brightbox-cli-4.2.1 lib/brightbox-cli/commands/sql/instances_snapshot.rb
brightbox-cli-4.2.0 lib/brightbox-cli/commands/sql/instances_snapshot.rb
brightbox-cli-4.1.0 lib/brightbox-cli/commands/sql/instances_snapshot.rb
brightbox-cli-4.0.0 lib/brightbox-cli/commands/sql/instances_snapshot.rb
brightbox-cli-4.0.0.rc2 lib/brightbox-cli/commands/sql/instances_snapshot.rb