adfinis / kubernetes-etcd-backup

GNU Affero General Public License v3.0
2 stars 0 forks source link

Deprecated: Use `etcdutl snapshot status` instead. #10

Closed 4censord closed 2 months ago

4censord commented 3 months ago

Currently, while running a backup one gets the following deprecation warning

+ etcdctl --write-out=table snapshot status /tmp/etcd-backup/snapshot.db
Deprecated: Use `etcdutl snapshot status` instead.
+----------+-----------+------------+------------+
|   HASH   | REVISION  | TOTAL KEYS | TOTAL SIZE |
+----------+-----------+------------+------------+
|    [...] |     [...] |       2686 |      38 MB |
+----------+-----------+------------+------------+

We should fix that at some point

Full log ```bash + umask 0027 + case "${ETCD_BACKUP_EXPIRE_TYPE}" in + '[' days = days ']' + case "${ETCD_BACKUP_KEEP_DAYS}" in ++ date +etcd-backup-%FT%T%:z + BACKUP_FOLDER=etcd-backup-2024-07-24T11:57:02+00:00 ++ realpath -m //etcd-backup-2024-07-24T11:57:02+00:00 + BACKUP_PATH=/etcd-backup-2024-07-24T11:57:02+00:00 ++ realpath -m /backup//etcd-backup-2024-07-24T11:57:02+00:00 + BACKUP_PATH_POD=/backup/etcd-backup-2024-07-24T11:57:02+00:00 ++ realpath -m /backup// + BACKUP_ROOTPATH=/backup + mkdir -p /tmp/etcd-backup + mkdir -p /backup/etcd-backup-2024-07-24T11:57:02+00:00 + ETCDCTL_API=3 + etcdctl --endpoints [data expunged] --cacert=/etc/kubernetes/pki/etcd-ca/ca.crt --cert=/etc/kubernetes/pki/etcd-peer/tls.crt --key=/etc/kubernetes/pki/etcd-peer/tls.key snapshot save /tmp/etcd-backup/snapshot.db {"level":"info","ts":"2024-07-24T11:57:02.62702Z","caller":"snapshot/v3_snapshot.go:65","msg":"created temporary db file","path":"/tmp/etcd-backup/snapshot.db.part"} {"level":"info","ts":"2024-07-24T11:57:02.70842Z","logger":"client","caller":"v3@v3.5.11/maintenance.go:212","msg":"opened snapshot stream; downloading"} {"level":"info","ts":"2024-07-24T11:57:02.708485Z","caller":"snapshot/v3_snapshot.go:73","msg":"fetching snapshot","endpoint":"[data expunged]"} {"level":"info","ts":"2024-07-24T11:57:04.117518Z","logger":"client","caller":"v3@v3.5.11/maintenance.go:220","msg":"completed snapshot read; closing"} {"level":"info","ts":"2024-07-24T11:57:04.26856Z","caller":"snapshot/v3_snapshot.go:88","msg":"fetched snapshot","endpoint":"[data expunged]","size":"38 MB","took":"1 second ago"} {"level":"info","ts":"2024-07-24T11:57:04.268698Z","caller":"snapshot/v3_snapshot.go:97","msg":"saved","path":"/tmp/etcd-backup/snapshot.db"} Snapshot saved at /tmp/etcd-backup/snapshot.db + ETCDCTL_API=3 + etcdctl --write-out=table snapshot status /tmp/etcd-backup/snapshot.db Deprecated: Use `etcdutl snapshot status` instead. +----------+-----------+------------+------------+ | HASH | REVISION | TOTAL KEYS | TOTAL SIZE | +----------+-----------+------------+------------+ | 67829190 | 184187095 | 2686 | 38 MB | +----------+-----------+------------+------------+ + mv /tmp/etcd-backup/snapshot.db /backup/etcd-backup-2024-07-24T11:57:02+00:00 + rm -rv /tmp/etcd-backup removed directory '/tmp/etcd-backup' + '[' days = days ']' + find /backup -mindepth 1 -maxdepth 1 -type d -mtime +30 -exec rm -rv '{}' + ```