Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable pre- and post-scp commands on remote host #43

Conversation

jan-brinkmann
Copy link
Contributor

This enables us to execute commands on the remote host where we transfer a backup to.

When we transfer a backup by means of scp, we probably have access to execute commands on that host. Now, we can overhand arbitrary commands in the environmental variables PRE_SCP_COMMAND and POST_SCP_COMMAND that are executet before and after the backup is transferred.

There is an example docker-compose.yml file in tests/pre-post-scp-command showing how rotate-backups can be executed after the backup has been transferred. Additionally, there is a reference in the README.md.

@jan-brinkmann jan-brinkmann changed the title Enable pre and post command on remote host Enable pre- and post-scp commands on remote host Dec 30, 2021
Copy link
Owner

@jareware jareware left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Beautiful, thank you! 👏👏

@jareware jareware merged commit 7c752f3 into jareware:master Dec 31, 2021
@jareware
Copy link
Owner

@jan-brinkmann this is now in 2.5.0 which was just pushed, want to pull it and check that it works for your use case?

@jan-brinkmann
Copy link
Contributor Author

@jareware, yes, it does!
Thank you!

@jan-brinkmann jan-brinkmann deleted the Enable-pre-and-post-command-on-remote-host branch January 2, 2022 18:10
@jareware
Copy link
Owner

jareware commented Jan 3, 2022

Thanks again for a great contribution!

@jareware jareware mentioned this pull request Jan 3, 2022
mpietruschka pushed a commit to pietmacom/docker-volume-backup that referenced this pull request Mar 25, 2023
…-command-on-remote-host

Enable pre- and post-scp commands on remote host
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants