🎥 PodcastsHPR4728: Programmable Logic Controls - Episode 3(16.09.2026 um 02:00 Uhr)
🔧 AI Nachrichten OpenAI: Stay on top of the pack with ChatGPT Work.(16.09.2026 um 01:31 Uhr)
🔧 ProgrammierungWhat's New in macOS 27 for Developers?(15.09.2026 um 23:01 Uhr)
🔧 ProgrammierungThe 7 Essential Parts of Your Online Presence(15.09.2026 um 23:07 Uhr)
🐧 Linux TippsHow to Write a Linux Kernel Module That Actually Builds(15.09.2026 um 23:10 Uhr)
🔧 ProgrammierungA Task Without A Check Command Is Not Automated(16.09.2026 um 00:53 Uhr)
🔧 ProgrammierungWhy You Don't Have To Learn The Terminal(16.09.2026 um 00:54 Uhr)
🎥 PodcastsHPR4728: Programmable Logic Controls - Episode 3(16.09.2026 um 02:00 Uhr)
🔧 AI Nachrichten OpenAI: Stay on top of the pack with ChatGPT Work.(16.09.2026 um 01:31 Uhr)
🔧 ProgrammierungWhat's New in macOS 27 for Developers?(15.09.2026 um 23:01 Uhr)
🔧 ProgrammierungThe 7 Essential Parts of Your Online Presence(15.09.2026 um 23:07 Uhr)
🐧 Linux TippsHow to Write a Linux Kernel Module That Actually Builds(15.09.2026 um 23:10 Uhr)
🔧 ProgrammierungA Task Without A Check Command Is Not Automated(16.09.2026 um 00:53 Uhr)
🔧 ProgrammierungWhy You Don't Have To Learn The Terminal(16.09.2026 um 00:54 Uhr)

🔧 Programmierung 🕛 vor 1 Jahr 2 Min Lesezeit
0

Etcd Backup and Restore (3)

↗ Quelle (dev.to)
🗣️ Stimme:

Last post I have show steps to restore etcd, but when we edit the /etc/kubernetes/manifest/etcd.yaml file, there are some confuse among the /var/lib/etcd on hostPath and mountVolumne, the --data-dir in the




CODE
etcdctl snapshot restore --data-dir






and the commands inside the /etc/kubernetes/manifest/etcd.yaml file. So here let's give a more detailed explanation.





  1. Saving the snapshot




CODE
etcdctl snapshot save ./stored.db ...







  • This command connects to the running etcd

  • Takes a snapshot of its current state

  • Saves it as stored.db in current directory on host machine





  1. Restoring the snapshot




CODE
etcdctl snapshot restore ./stored.db --data-dir /var/lib/etcd-restore







  • Takes the stored.db snapshot file

  • Unpacks/expands it into a complete etcd data directory structure

  • Places this expanded data directory at /var/lib/etcd-restore on host machine

  • This directory now contains all the database files etcd needs to run





  1. Container mounting and startup




CODE
# In etcd.yaml
volumes:
- hostPath:
path: /var/lib/etcd-restore # Host machine directory
type: DirectoryOrCreate
name: etcd-data
...
volumeMounts:
- mountPath: /var/lib/etcd # Container directory
name: etcd-data







  • When etcd pod starts, Kubernetes:


    1. Sees the hostPath volume configuration

    2. Mounts host's /var/lib/etcd-restore directory

    3. Makes it appear at /var/lib/etcd inside container







  1. etcd process startup




CODE
command:
- etcd
- --data-dir=/var/lib/etcd







  • etcd process starts inside container

  • Looks for its data at /var/lib/etcd (which is actually host's /var/lib/etcd-restore mounted)

  • Finds and uses the restored data



So the complete data path is:




CODE
1. stored.db (snapshot file)

2. /var/lib/etcd-restore/* (expanded data on host)
↓ (mount)
3. /var/lib/etcd/* (same data, visible in container)
↓ (etcd process)
4. Running etcd using restored data


Vollständiger Original-Artikel
Den kompletten Beitrag mit allen Details direkt auf dev.to lesen.
↗ Original-Artikel auf dev.to lesen
Wie bewertest du diesen Beitrag?
1 Klick Feedback
Teilen mit Netzwerk & Team:

Community-Analysen & Experten-Meinungen 0

Verfasse deine eigene Analyse, teile Workarounds oder diskutiere diesen Vorfall im Blog.
Noch keine Community-Analyse verfasst. Markiere einen Textabschnitt oder klicke oben auf Eigene Analyse verfassen“!
Community Pulse: Relevanz-Einschätzung
1 Klick Experten-Votum
🔴 Akute Relevanz 0%
🟡 In Evaluierung 0%
🟢 Keine Auswirkung 0%
Spannende Innovation 0%
Verwandte Story-Cluster & Quellen (Vektor-KI)
Port 8095 Engine
1 Quelle
Ryzen Master does not support current processor: Unsupported Processor
1 Quelle
What's New in macOS 27 for Developers?
1 Quelle
How to Build an Endpoint Data Loss Prevention Strategy for Your Development Team
Ähnliche Beiträge
🔍 Verwandte News

Auch interessante Nachrichten Etcd Backup and Restore (3)

Thematisch verwandte Begriffe: Etcd, Backup, Restore · 6 Treffer

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...