community / community.general / 3.8.10 / module / scaleway_database_backup Scaleway database backups management module | "added in version" 1.2.0 of community.general" Authors: Guillaume Rodriguez (@guillaume_ro_fr)community.general.scaleway_database_backup (3.8.10) — module
Install with ansible-galaxy collection install community.general:==3.8.10
collections: - name: community.general version: 3.8.10
This module manages database backups on Scaleway account U(https://developer.scaleway.com).
- name: Create a backup community.general.scaleway_database_backup: name: 'my_backup' state: present region: 'fr-par' database_name: 'my-database' instance_id: '50968a80-2909-4e5c-b1af-a2e19860dddb'
- name: Export a backup community.general.scaleway_database_backup: id: '6ef1125a-037e-494f-a911-6d9c49a51691' state: exported region: 'fr-par'
- name: Restore a backup community.general.scaleway_database_backup: id: '6ef1125a-037e-494f-a911-6d9c49a51691' state: restored region: 'fr-par' database_name: 'my-new-database' instance_id: '50968a80-2909-4e5c-b1af-a2e19860dddb'
- name: Remove a backup community.general.scaleway_database_backup: id: '6ef1125a-037e-494f-a911-6d9c49a51691' state: absent region: 'fr-par'
id: description: - UUID used to identify the database backup. - Required for C(absent), C(exported) and C(restored) states. type: str name: description: - Name used to identify the database backup. - Required for C(present) state. - Ignored when C(state=absent), C(state=exported) or C(state=restored). required: false type: str wait: default: false description: - Wait for the instance to reach its desired state before returning. type: bool state: choices: - present - absent - exported - restored default: present description: - Indicate desired state of the database backup. - C(present) creates a backup. - C(absent) deletes the backup. - C(exported) creates a download link for the backup. - C(restored) restores the backup to a new database. type: str region: choices: - fr-par - nl-ams - pl-waw description: - Scaleway region to use (for example C(fr-par)). required: true type: str api_url: aliases: - base_url default: https://api.scaleway.com description: - Scaleway API URL. type: str api_token: aliases: - oauth_token description: - Scaleway OAuth token. required: true type: str expires_at: description: - Expiration datetime of the database backup (ISO 8601 format). - Ignored when C(state=absent), C(state=exported) or C(state=restored). required: false type: str api_timeout: aliases: - timeout default: 30 description: - HTTP timeout to Scaleway API in seconds. type: int instance_id: description: - UUID of the instance associated to the database backup. - Required for C(present) and C(restored) states. - Ignored when C(state=absent) or C(state=exported). required: false type: str wait_timeout: default: 300 description: - Time to wait for the backup to reach the expected state. required: false type: int database_name: description: - Name used to identify the database. - Required for C(present) and C(restored) states. - Ignored when C(state=absent) or C(state=exported). required: false type: str validate_certs: default: true description: - Validate SSL certs of the Scaleway API. type: bool wait_sleep_time: default: 3 description: - Time to wait before every attempt to check the state of the backup. required: false type: int query_parameters: default: {} description: - List of parameters passed to the query string. type: dict
metadata: description: Backup metadata. returned: when C(state=present), C(state=exported) or C(state=restored) sample: metadata: created_at: '2020-08-06T12:42:05.631049Z' database_name: my-database download_url: null download_url_expires_at: null expires_at: null id: a15297bd-0c4a-4b4f-8fbb-b36a35b7eb07 instance_id: 617be32e-6497-4ed7-b4c7-0ee5a81edf49 instance_name: my-instance name: backup_name region: fr-par size: 600000 status: ready updated_at: '2020-08-06T12:42:10.581649Z' type: dict