-
Notifications
You must be signed in to change notification settings - Fork 1
4. DB and config Management
You can Export VM data from the Database to file using:
VMMgr_Launcher db export myvm
Then reimport using:
VMMgr_Launcher db import /path/to/my/file
Note: keep in mind, depending of your vm def, for services like SPICE, TELNET, VNC, QMP, and even MAC gen, if you export your vm, then delete to db, create other vm, then reimport your vm, chance you will have IP, port and MAC duplication, you will have to manage this manually.
Each time your db is modified, a copy of the current db is made to:
$VMMGR_DATA_PATH/DB_BKP/date-db.latest.bkp
this backup is renamed without 'latest' at next db change: '*.db.latest.bkp' is always a copy of your current db
This db autosaving is automatic
You can list your backup using:
VMMgr_Launcher db backup list
You can restore a backup using:
VMMgr_Launcher db restore backupfile
if you have delete your db you can restore it using:
VMMgr_Launcher db restore last
In VMMgr_.conf you have 2 variables:
DBMAXAGE # how many day we keep the backup, warn: this can delete all your backup!
DBMAXBACKUP # how many backup files we keep
purge your backups using:
VMMgr_Launcher db purge
In case you have your vmconfig file, but your vm is not declared in the db (either you have delete it or restored an old backup), you can use:
VMMgr_Launcher db todb myvm.conf
At the opposite, you have lost your vmconfig, but your vm is declared into the db:
VMMgr_Launcher db reconf myvm
This will ask you what template you want to use