-
Notifications
You must be signed in to change notification settings - Fork 86
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 commands #46
Enable pre and post commands #46
Conversation
`PRE_COMMAND` | | Commands that is executed before the backup is transferred to `/archive`. | ||
`POST_COMMAND` | | Commands that is executed after the backup has been transferred to `/archive`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
`PRE_COMMAND` | | Commands that is executed before the backup is transferred to `/archive`. | |
`POST_COMMAND` | | Commands that is executed after the backup has been transferred to `/archive`. | |
`PRE_COMMAND` | | Command that is executed before the backup is transferred to `/archive`. | |
`POST_COMMAND` | | Command that is executed after the backup has been transferred to `/archive`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Typos - thank you!
PRE_COMMAND: "ls -la /archive" | ||
# Command that is executed after the backup has been transferred: | ||
# "Delete all files in /archive that are older than seven days." | ||
POST_COMMAND: "rm $$(find /archive/* -mtime +7)" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Beautifully concise 👏
…-commands Enable pre and post commands
This enables us to execute commands before and after the backup has been transferred to
/archive
.These commands are given by
PRE_COMMAND
andPOST_COMMAND
.In the example
docker-compose.yml
, all backups as listed before the current backup is tansferred. Afterwards, all backups older than seven days are removed.