proxmox use auto backup to recovery config.db

浅浅的花香味﹌ 2024-04-19 10:37 72阅读 0赞
  1. root@proxmox2:~# ls -la /var/lib/pve-cluster/backup/
  2. total 40
  3. drwxr-xr-x 2 root root 4096 Jan 17 12:04 .
  4. drwxr-xr-x 3 root root 4096 Jan 18 07:34 ..
  5. -rw-r--r-- 1 root root 12645 Nov 11 09:42 config-1478853733.sql.gz
  6. -rw-r--r-- 1 root root 15188 Jan 17 12:04 config-1484651064.sql.gz

I stopped the cluster service

Code:

  1. systemctl stop pve-cluster
  2. systemctl stop corosync
  3. pmxcfs -l

This way I’m working in local mode. Then I restored the backup from /var/lib/pve-cluster/backup like this:
First untar the config backup to get an sql file (e.g. config-1546119386.sql.gz)

Code:

  1. cd /var/lib/pve-cluster
  2. mv config.db config.db.bak
  3. cp /var/lib/pve-cluster/backup/config-1546119386.sql.gz /var/lib/pve-cluster/
  4. gzip -d config-1546119386.sql.gz
  5. sqlite3 config.db < config-1546119386.sql

After a reboot I can access to my VM’s.

My VM’s did not autostart therefore:

Code:

  1. systemctl stop pve-cluster
  2. systemctl stop corosync
  3. pmxcfs -l
  4. rm /etc/pve/corosync.conf
  5. rm /etc/corosync/*
  6. killall pmxcfs
  7. systemctl start pve-cluster

corosync still fail —> but VM are up again
corosync I will try to repair.

发表评论

表情:
评论列表 (有 0 条评论,72人围观)

还没有评论,来说两句吧...

相关阅读