How to backup an instance and download it to the desktop?
You should first prepare the python environment on your desktop.
Please see: https://creodias.eu/faq-openstack-cli OPENSTACK CLI.
https://creodias.eu/-/how-to-install-openstackclient-linux- HOW TO INSTALL OPENSTACKCLIENT (LINUX)?
https://creodias.eu/-/how-to-install-openstackclient-windows-gitbash-cygwin HOW TO INSTALL OPENSTACKCLIENT (WINDOWS)? GITBASH/CYGWIN
Assume that we created an instance " vm-john-01"
Using CLI you can list the instances in your project.
$ openstack server list +--------------------------------------+------------+--------+------------------------------------+------------------+-----------+ | ID | Name | Status | Networks | Image | Flavor | +--------------------------------------+------------+--------+------------------------------------+------------------+-----------+ | beec5cf6-6214-4dbc-921b-6bc10fbb33a5 | vm-john-01 | ACTIVE | private_network_02722=192.168.0.11 | Ubuntu 18.04 LTS | eo1.small | +--------------------------------------+------------+--------+------------------------------------+------------------+-----------+
Now you can create a backup from CLI:
$ openstack server backup create --name backup-01 beec5cf6-6214-4dbc-921b-6bc10fbb33a5
If you want to have control over the number of stored backups, to the above command you should add the --rotate<count> parameter:
$ openstack server backup create --name backup-01 --rotate 2 beec5cf6-6214-4dbc-921b-6bc10fbb33a5
You can see the backup "backup-01" in https://cf2.cloudferro.com/project/images
or in CLI:
$ openstack image list --private +--------------------------------------+-----------+--------+ | ID | Name | Status | +--------------------------------------+-----------+--------+ | cd69dc56-9463-45c7-90dc-a9e549fb6ca1 | backup-01 | active | +--------------------------------------+-----------+--------+
Now you can download the image to your desktop
$ openstack image save --file backup-on-the-desktop cd69dc56-9463-45c7-90dc-a9e549fb6ca1
After that, you can upload backup file using dashboard:
Go to Project → Compute → Images.
Click '"Create Image".
On this panel you must insert image name, choose backup file and backup format. Next click "Create Image".
You can also use CLI to upload backup file:
openstack image create --file path/to/backup <backup_name>