birdwatcher icon indicating copy to clipboard operation
birdwatcher copied to clipboard

Need to backup etcd meta, wonder if birdwatcher provides API for it?

Open Andy6132024 opened this issue 6 months ago • 7 comments

See title. Is there an example?

Andy6132024 avatar Jun 27 '25 07:06 Andy6132024

If the need is only to backup etcd meta, then backup command will do. No restore supported yet.

congqixia avatar Jun 27 '25 07:06 congqixia

If the need is only to backup etcd meta, then backup command will do. No restore supported yet.

Actually, I would like to create some automation job which backs up etcd meta. backup command doesn't seem to meet my requirements. @congqixia

Andy6132024 avatar Jun 27 '25 08:06 Andy6132024

Hi @congqixia, I just want to follow up again on this topic. I am trying to implement a tool which automatically backup etcd on a schedule. The backup command can only be executed after entering the birdwatcher shell. So I wonder if there's any API/SDK to create backup, which is a more direct approach. Thanks!

Andy6132024 avatar Jul 04 '25 02:07 Andy6132024

@Andy6132024 if using a pre-built binary is acceptable, you could try follow command:

./bin/birdwatcher --olc="#connect --etcd [etcd-address] --auto,backup"

currently, birdwatcher is not designed to used as a lib, so using it's internal function might be a little bit tricky here.

congqixia avatar Jul 04 '25 03:07 congqixia

--olc="#connect --etcd [etcd-address] --auto,backup"

./bin/birdwatcher --olc="#connect --etcd [etcd-address]:[port] --auto,backup" It works, Ty!

Andy6132024 avatar Jul 04 '25 03:07 Andy6132024

@congqixia Is there a plan to implement restore?

Andy6132024 avatar Jul 04 '25 03:07 Andy6132024

Hi @congqixia, I believe without the procedure to restore, the backup file is not very useful. It's not exactly an ETCD snapshot, but encoded data (protobuf) of various content.

Andy6132024 avatar Jul 08 '25 09:07 Andy6132024