adfinis / vault-raft-backup-agent

Vault Raft Integrated Storage Snapshot Automation
17 stars 9 forks source link

Run s3cmd after vault-snapshot #4

Closed in0rdr closed 4 years ago

in0rdr commented 4 years ago

@pree Is it intended to have "cron like" syntax in the vault-snapshot shell script? Shouldn't the sync either:

The PR assumes that the sync should be run as an additional cron entry (because of the 5min after the full hour syntax). However, to achieve the same without additional crontab entry, we should amend the script:

echo "/usr/bin/s3cmd sync /opt/vault/snapshots/* s3://raft-snapshots" >> /usr/local/bin/vault-snapshot

What do you think?

pree commented 4 years ago

It was intendet to add this to the script, not as a cronjob. With that it will be synced directly and there are no problems if the snapshot will take more than 5 minutes. I was thinking about doing it as a cornjob and forget to remove the cron-config from the echo line.

in0rdr commented 4 years ago

Thanks for clarification. I amended the request accordingly.