« Proxmox backup config » : différence entre les versions

Page créée avec « = '''Backup de la configuration du host Proxmox''' = Sauvegarder '''tout ce qui permet de reconstruire rapidement le node'''. Lance : <syntaxhighlight lang="bash">sudo tar czf /root/proxmox-config-$(hostname)-$(date +%F).tar.gz \ /etc/pve \ /etc/network \ /etc/hosts \ /etc/resolv.conf \ /etc/passwd \ /etc/group \ /etc/shadow</syntaxhighlight> Ça te crée une archive compressée dans <code>/root</code>. Cette méthode est souvent recommandée pour la reprise... »
 
 
(5 versions intermédiaires par le même utilisateur non affichées)
Ligne 5 : Ligne 5 :
Lance :
Lance :


<syntaxhighlight lang="bash">sudo tar czf /root/proxmox-config-$(hostname)-$(date +%F).tar.gz \
<syntaxhighlight lang="bash" copy>sudo tar czf /mnt/ssd-sata/backups/proxmox/proxmox-config-$(hostname)-$(date +%F).tar.gz \
/etc/pve \
/etc/pve \
/etc/network \
/etc/network \
Ligne 13 : Ligne 13 :
/etc/group \
/etc/group \
/etc/shadow</syntaxhighlight>
/etc/shadow</syntaxhighlight>
Ça te crée une archive compressée dans <code>/root</code>.
Ça te crée une archive compressée dans <code>/mnt/ssd-sata/backups/proxmox/</code>.


Cette méthode est souvent recommandée pour la reprise après incident. ([Saturn ME][2])
Cette méthode est souvent recommandée pour la reprise après incident.




Ligne 70 : Ligne 70 :
Copie-le sur ton NAS / autre machine :
Copie-le sur ton NAS / autre machine :


<syntaxhighlight lang="bash">scp /root/proxmox-config-*.tar.gz user@nas:/backup/proxmox/</syntaxhighlight>
<syntaxhighlight lang="bash" copy>scp /root/proxmox-config-*.tar.gz user@nas:/backup/proxmox/</syntaxhighlight>
ou sur un datastore PBS avec <code>proxmox-backup-client</code>.
ou sur un datastore PBS avec <code>proxmox-backup-client</code>.


Ligne 83 : Ligne 83 :
Tu peux faire une sauvegarde SQL :
Tu peux faire une sauvegarde SQL :


<syntaxhighlight lang="bash">sudo sqlite3 /var/lib/pve-cluster/config.db .dump > /root/pve-config-db-$(date +%F).sql</syntaxhighlight>
<syntaxhighlight lang="bash" copy>sudo sqlite3 /var/lib/pve-cluster/config.db .dump > /mnt/ssd-sata/backups/proxmox/pve-config-db-$(date +%F).sql</syntaxhighlight>
Très utile en dernier recours. ([Proxmox Support Forum][3])
Très utile en dernier recours. ([Proxmox Support Forum][3])


Ligne 96 : Ligne 96 :
Exemple avant update :
Exemple avant update :


<syntaxhighlight lang="bash">sudo tar czf /root/pre-upgrade-pve-$(date +%F-%H%M).tar.gz /etc/pve /etc/network</syntaxhighlight>
<syntaxhighlight lang="bash" copy>sudo tar czf /mnt/ssd-sata/backups/proxmox/pre-upgrade-pve-$(date +%F-%H%M).tar.gz /etc/pve /etc/network</syntaxhighlight>


-----
-----
[[Catégorie:Proxmox]]
[[Catégorie:Proxmox]]