nomad-cluster-setup
nomad-cluster-setup copied to clipboard
feat: add support to backup nomad raft snapshot to s3
If a nomad_raft_backup_bucket is defined, this adds a script that runs at midnight and 12PM to backup Nomad RAFT snapshot to the S3 bucket. The script will be present on all servers, but will only run on the leader.
- The cron is run using systemd-timer.
- The snapshot is timestamped and namespaced to a folder by
cluster_name, so multiple snapshots from different clusters can use the same bucket.
NOTE: There was also an issue with the file limit check which got autocorrected by shellcheck, so a fix for that is included here as well.