You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'd like to kindly request adding the necessary code to be able to extract files from an archive in a remote repository. This, in turn, could be use in combination with other tasks to, say, restore a database, etc.
It would be the equivalent to executing the following commands in the console:
BORG_PASSPHRASE="CHANGEME" \
BORG_REPO=m5vz9gp4@m5vz9gp4.repo.borgbase.com:repo \
borg extract --strip-components 3 ::<archive> var/backups/postgresql/database.bak
The command would be executed in the host, so the file would be extracted in the host where Ansible is connected to. The target directory (e.g. /root/database.bak) should be configurable.
Thanks in advance.
The text was updated successfully, but these errors were encountered:
One use case is to extract a copy of the (PostgreSQL | MongoDB | MySQL) production database(s) that was backed up last night and restore it in a test server.
Since they are all inside LinuX Containers and developers don't have access to such containers, I'd like them to connect to a bastion container with Ansible installed and execute a playbook. This playbook would execute a number of tasks, such as:
Extract the database.bak file from a given archive in the remote repository somewhere into the test server.
Use pg_restore (or similar) to restore the dump.
Use psql to execute a number of SQL commands to finetune/adapt the restored data.
There is already a BASH script that does this. I could create an Ansible playbook that just executes such script, but I thought it nice to turn it all into a playbook, as there is already Ansible support for PostgreSQL to dump and restore databases.
Dear contributors,
I'd like to kindly request adding the necessary code to be able to extract files from an archive in a remote repository. This, in turn, could be use in combination with other tasks to, say, restore a database, etc.
It would be the equivalent to executing the following commands in the console:
The command would be executed in the host, so the file would be extracted in the host where Ansible is connected to. The target directory (e.g.
/root/database.bak
) should be configurable.Thanks in advance.
The text was updated successfully, but these errors were encountered: