6 min read
bash
# Linux:
curl -LO https://github.com/dcos-labs/professional-services/raw/master/tools/dcos-secrets-backup/binaries/dcos-secrets-backup-linux
# macOS:
curl -LO https://github.com/dcos-labs/professional-services/raw/master/tools/dcos-secrets-backup/binaries/dcos-secrets-backup-darwin
bash
mv dcos-secrets-backup-* dcos-secrets-backup
chmod +x dcos-secrets-backup
bash
$ ./dcos-secrets-backup \
--hostname 34.216.178.11 \
--username bootstrapuser \
--password deleteme \
--cipherkey TvP5zCEPtRBuvEr2enFAM7cRzJxcKcnT \
--destfile /tmp/backup/secrets-2018-01-10.tar \
backup
Logging into cluster [https://34.216.178.11]
Getting secret 'test'
Getting secret 'edgelb-secret'
Getting secret 'dev/test'
Writing to tar at /tmp/backup/secrets-2018-01-10.tar
- Hostname should be the hostname of your master (or master load balancer)
- Username and Password should be local users in the cluster with permissions to read the secrets you want to back up (in this case, the `bootstrapuser` has `dcos:superuser` permissions)
- Cipherkey is optional (it has a default of `ThisIsAMagicKeyString12345667890`, and should be a string that is a multiple of 32 characters long (this limitation may be removed in the future)
- Destfile indicates where you want the tar file to be placed. The directory must be pre-existing (this may be changed in the future)
bash
$ ./dcos-secrets-backup \
--hostname 54.214.120.255 \
--username bootstrapuser \
--password deleteme \
--cipherkey TvP5zCEPtRBuvEr2enFAM7cRzJxcKcnT \
--sourcefile /tmp/backup/secrets-2018-01-10.tar \
restore
Logging into cluster [https://54.214.120.255]
Queueing secret [dev/test] ...
Queueing secret [edgelb-secret] ...
Queueing secret [test] ...
Secret [dev/test] successfully updated.
Secret [edgelb-secret] successfully updated.
Secret [test] successfully updated.
- Hostname should be the hostname of your master (or master load balancer)
- Username and Password should be local users in the cluster with permissions to write the secrets you want to back up (in this case, the `bootstrapuser` has `dcos:superuser` permissions)
- Cipherkey is optional (it has a default of `ThisIsAMagicKeyString12345667890`, and should be a string that is a multiple of 32 characters long (this limitation may be removed in the future)
- Sourcefile which tarfile to be used. The directory must be pre-existing (this may be changed in the future)
- This will create secrets that do not exist
- This will *overwrite* secrets that already exist.