-
Notifications
You must be signed in to change notification settings - Fork 0
/
Backup_VMs.mw
89 lines (62 loc) · 5.86 KB
/
Backup_VMs.mw
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
{{Header}}
{{title|title=
Backup {{project_name_short}} VMs
}}
{{#seo:
|description=Overview of Ways to Backup your {{project_name_long}} Virtual Machines
|image=Isolated-316392640.jpg
}}
[[File:Isolated-316392640.jpg|thumb]]
{{intro|
Overview of Ways to Backup your {{project_name_short}} Virtual Machines
}}
= Overview - Ways to Backup {{project_name_short}} VMs =
There is not a great and simple way to make backups yet. Best you can do is either:
* '''A)''' <u>VM export</u>: (Easiest, recommended.) Use the [[#VM_Export|export feature]] of the virtualizer such as VirtualBox.
* '''B)''' <u>Shared folder</u>: (Moderate difficulty.) Copy individual folders to a [[#Shared_Folder|shared folder]].
* '''C)''' <u>Manual copy</u>: (Difficult, discouraged.) Create a copy of your VM settings folder as well as your virtual hard drive files. There is some important knowledge you have to be aware of, this is documented below.
= General Important Recommendation =
Creating backups is only the first step. You should do a test run if you are actually to restore your backup. Otherwise you may experience a nasty surprise that some files are missing for a successful and complete restoration.
= VM Export =
== VirtualBox ==
Using the VM export feature of VirtualBox will create standalone <code>.ova</code> files which the user can easily import on any other computer that can run VirtualBox.
Exporting a VirtualBox VM means creating a copy of the VM's virtual hard drive, configuration files, into a single file that can be transferred to another physical machine (computer) or storage device. VirtualBox uses the Open Virtual Appliance (OVA) file format.
Once the file is created, the user can import it into VirtualBox on another physical machine and the VM will be set up with the same configuration as the original VM. This can be useful for migrating VMs between physical machines or for sharing VMs with others.
Exporting a VirtualBox VM is [[unspecific|unspecific to {{project_name_short}}]]. Instructions:
'''1.''' Open VirtualBox and select the VM you want to export from the list of available virtual machines.
'''2.''' Click on the "File" menu and select "Export Appliance" from the dropdown menu.
'''3.''' In the Export Appliance window, select the VM you want to export and choose a name and location for the exported package.
'''4.''' If asked, use the OVA file format.
'''5.''' Do not make any changes to the VM settings.
'''6.''' Click "Export" to start the export process.
'''7.''' Wait for the export process to finish. This may take some time depending on the size of the VM and disk speed.
'''8.''' Once the export is complete, you can move the exported package to another computer or storage device.
'''9.''' Done.
'''10.''' To import the exported VM you can use the "File" menu and select "Import Appliance" from the dropdown menu. Then, choose the exported package and follow the prompts to import the VM.
= Shared Folder =
A shared folder is a folder that can be accessed by both, the host operating systems as well as the {{VM}}. Changes made to the folder from one either the host operating system or the VM are visible to the other. It is a convenient way to share files from the host to the VM and/or vice versa.
== VirtualBox ==
In VirtualBox, users can set up a shared folder by creating a folder on the host operating system (the operating system on the physical machine) and then configuring VirtualBox to share that folder with the guest operating system (the operating system running inside VirtualBox). This allows for easy file sharing and transfer between the host and guest operating systems.
See [[VirtualBox/Guest_Additions#Shared_Folder|VirtualBox Guest Additions and Shared Folders chapter Shared Folder]].
= Manual Copy of VMs =
<div class="toccolours mw-collapsible mw-collapsed">
Manually copying VMs is discouraged because it is difficult and requires a lot important knowledge. For more information, please press on expand on the right.
<div class="mw-collapsible-content">
== VirtualBox ==
=== VirtualBox VMs Folder versus VirtualBox Settings Folder ===
* VirtualBox VMs folder: <code>~/VirtualBox VMs</code>
* VirtualBox settings folder: <code>~/'''.'''VirtualBox</code>
=== ~/VirtualBox VMs Folder ===
If you want to copy your VirtualBox's to another harddrive, only creating a backup of your <code>~/VirtualBox VMs</code> folder won't suffice. You have to remember to have a backup of your VirtualBox settings folder (<code>~/'''.'''VirtualBox</code>) as well, because manually re-creating that folder is difficult and undocumented by VirtualBox's documentation.
=== Using VirtualBox's VM Cloning Feature for Backups is not Simple ===
The clone feature of VirtualBox is not very user friendly for backups for the same reason as above. It works, for cloning VMs, but it is not very useful for easy backups, because general VM settings are still stored in your home folder (<code>~/'''.'''VirtualBox</code>) and these are difficult to restore as mentioned above. So if you use the clone feature and backup your VMs on a different harddrive, you have to remember to have a backup of your VirtualBox settings folder (<code>~/'''.'''VirtualBox</code>) as well.
=== Backup VirtualBox Settings Files ===
Turn off VirtualBox before attempting to backup the VirtualBox's settings folder (<code>~/'''.'''VirtualBox</code>).
When you change VM settings, add/remove VMs, add/remove virtual hdds, add/remove snapshots you should create a new backup.
=== Advanced Users using git ===
Adding your VirtualBox settings folder to a [https://en.wikipedia.org/wiki/Revision_control revision control system] such as [https://en.wikipedia.org/wiki/Git_(software) git] is a good addition to backups of VirtualBox's settings folder. Should VirtualBox damage your settings file and its backup file (happens sometimes), you can try a recent backup from an earlier git revision.
</div>
</div>
{{reflist|close=1}}
{{Footer}}
[[Category:Documentation]]