Managed Kubernetes
Latest
Frequently Asked Questions
Solutions
How Tos
Internal Only
Templates
Powered By

Title
Message
Create new category
What is the title of your new category?
Edit page index title
What is the title of the page index?
Edit category
What is the new title of your category?
Edit link
What is the new title and URL of your link?
ETCD Backup Failing With Error Message "Error: could not rename /root/etcd_backup0/.part"
Copy Markdown
Open in ChatGPT
Open in Claude
Problem
ETCD backup is failing with the error mentioned below.
ETCD Backup Error
# ETCDCTL_API=3 etcdctl snapshot save /root/etcd_backup0/{"level":"info","ts":1666284121.098649,"caller":"snapshot/v3_snapshot.go:119","msg":"created temporary db file","path":"/root/etcd_backup0/.part"}{"level":"info","ts":"2022-10-20T16:42:01.100Z","caller":"clientv3/maintenance.go:200","msg":"opened snapshot stream; downloading"}{"level":"info","ts":1666284121.10057,"caller":"snapshot/v3_snapshot.go:127","msg":"fetching snapshot","endpoint":"127.0.0.1:2379"}{"level":"info","ts":"2022-10-20T16:42:01.600Z","caller":"clientv3/maintenance.go:208","msg":"completed snapshot read; closing"}{"level":"info","ts":1666284121.6521926,"caller":"snapshot/v3_snapshot.go:142","msg":"fetched snapshot","endpoint":"127.0.0.1:2379","size":"18 MB","took":0.553370829}Error: could not rename /root/etcd_backup0/.part to /root/etcd_backup0/ (rename /root/etcd_backup0/.part /root/etcd_backup0/: file exists)Environment
- Platform9 Managed Kubernetes – All Versions
Cause
- The ETCD DB backup command mentioned below was intended to save the ETCD snapshot backup file under
/root/etcd_backup0/directory.
Failed ETCD backup commad
xxxxxxxxxx# ETCDCTL_API=3 etcdctl snapshot save /root/etcd_backup0/- But Instead of that , the
/root/etcd_backup0/is considered as the Database snapshot backup file name. - Since a directory with that name is already present hence it is failing to take backup.
Resolution
- ETCD backup command expects a file name as an argument which will be used to save the snapshot DB backup.
- Hence the ETCD backup command should always have the ETCD snapshot DB backup file name mention in it. For Example,
Working ETCD backup command
xxxxxxxxxxETCDCTL_API=3 etcdctl snapshot save $HOME/etcd-backup-snapshot-$(date +%s).dbVariableType to search · ESC to discard
GlossaryType to search · ESC to discard
InsertType to search · ESC to discard
No matches
Last updated on
Was this page helpful?
Discard Changes
Do you want to discard your current changes and overwrite with the template?
Archive Synced Block
Message
Create new Template
What is this template's title?
Delete Template
Message