bin/acquia in acquia_toolbelt-1.4.0 vs bin/acquia in acquia_toolbelt-1.5.0

- old
+ new

@@ -370,10 +370,19 @@ def copy_database(subscription, database, source, destination) copy_database = acquia_api_call "sites/#{subscription}/dbs/#{database}/db-copy/#{source}/#{destination}", "POST" success "Database #{database} has been copied from #{source} to #{destination}." if copy_database["id"] end + # Public: Restore a previous database backup to a site. + # + # Returns a status message. + desc "restore-database-backup <subscription> <environment> <database> <backup_id>", "Restore a database backup." + def restore_database_backup(subscription, environment, database, backup_id) + restore_db = acquia_api_call "sites/#{subscription}/envs/#{environment}/dbs/#{database}/backups/#{backup_id}/restore", "POST" + success "Database backup #{backup_id} has been restored to #{database} in #{environment}." if restore_db["id"] + end + # Public: Show all the available domains for a subscription. # # Returns a list of the domains available. desc "list-domains <subscription>", "Show all available domains for a subscription." option :environment, :aliases => "-e" @@ -486,10 +495,19 @@ say "> Name: #{user["nickname"]}" say "> Key: #{truncate_ssh_key user["ssh_pub_key"]}" end end + # Public: Delete a SSH key from the subscription. + # + # Returns a status message. + desc "delete-ssh-user <subscription> <id>", "Delete a SSH key from the subscription." + def delete_ssh_user(subscription, id) + delete_ssh_request = acquia_api_call "sites/#{subscription}/sshkeys/#{id}", "DELETE" + success "SSH key #{id} has been successfully removed." if delete_ssh_request["id"] + end + # Public: Copy files from one environment to another. # # Returns a status message. desc "copy-files <subscription> <source> <destination>", "Copy files from one environment to another." def copy_files(subscription, source, destination) @@ -545,6 +563,6 @@ output_task_item(task) end end end -Acquia.start \ No newline at end of file +Acquia.startAcquia.start