1 | <?xml version="1.0" encoding="UTF-8"?>
|
---|
2 | <!DOCTYPE topic
|
---|
3 | PUBLIC "-//OASIS//DTD DITA Topic//EN" "topic.dtd">
|
---|
4 | <topic xml:lang="en-us" id="snapshots-take-restore-delete">
|
---|
5 | <title>Taking, Restoring, and Deleting Snapshots</title>
|
---|
6 |
|
---|
7 | <body>
|
---|
8 | <p>
|
---|
9 | There are three operations related to snapshots, as follows:
|
---|
10 | </p>
|
---|
11 | <ol>
|
---|
12 | <li>
|
---|
13 | <p>
|
---|
14 | <b outputclass="bold">Take a snapshot.</b> This makes
|
---|
15 | a copy of the machine's current state, to which you can go
|
---|
16 | back at any given time later.
|
---|
17 | </p>
|
---|
18 | <ul>
|
---|
19 | <li>
|
---|
20 | <p>
|
---|
21 | If your VM is running:
|
---|
22 | </p>
|
---|
23 | <p>
|
---|
24 | Select <b outputclass="bold">Take Snapshot</b>
|
---|
25 | from the <b outputclass="bold">Machine</b> menu
|
---|
26 | in the VM window.
|
---|
27 | </p>
|
---|
28 | <p>
|
---|
29 | The VM is paused while the snapshot is being created.
|
---|
30 | After snapshot creation, the VM continues to run as
|
---|
31 | normal.
|
---|
32 | </p>
|
---|
33 | </li>
|
---|
34 | <li>
|
---|
35 | <p>
|
---|
36 | If your VM is in either the Saved or the Powered Off
|
---|
37 | state, as displayed next to the VM name in the machine
|
---|
38 | list:
|
---|
39 | </p>
|
---|
40 | <p>
|
---|
41 | Display the Snapshots window and do one of the
|
---|
42 | following:
|
---|
43 | </p>
|
---|
44 | <ul>
|
---|
45 | <li>
|
---|
46 | <p>
|
---|
47 | Click <b outputclass="bold">Take</b> in the
|
---|
48 | Snapshots window toolbar.
|
---|
49 | </p>
|
---|
50 | </li>
|
---|
51 | <li>
|
---|
52 | <p>
|
---|
53 | Right-click on the <b outputclass="bold">Current
|
---|
54 | State </b>item in the list and select
|
---|
55 | <b outputclass="bold">Take</b>.
|
---|
56 | </p>
|
---|
57 | </li>
|
---|
58 | </ul>
|
---|
59 | </li>
|
---|
60 | </ul>
|
---|
61 | <p>
|
---|
62 | A dialog is displayed, prompting you for a snapshot name.
|
---|
63 | This name is purely for reference purposes, to help you
|
---|
64 | remember the state of the snapshot. For example, a useful
|
---|
65 | name would be "Fresh installation from scratch, no Guest
|
---|
66 | Additions", or "Service Pack 3 just installed". You can also
|
---|
67 | add a longer text description in the
|
---|
68 | <b outputclass="bold">Snapshot Description</b> field.
|
---|
69 | </p>
|
---|
70 | <p>
|
---|
71 | Your new snapshot will then appear in the snapshots list.
|
---|
72 | Underneath your new snapshot, you will see an item called
|
---|
73 | <b outputclass="bold">Current State</b>, signifying
|
---|
74 | that the current state of your VM is a variation based on
|
---|
75 | the snapshot you took earlier. If you later take another
|
---|
76 | snapshot, you will see that they are displayed in sequence,
|
---|
77 | and that each subsequent snapshot is derived from an earlier
|
---|
78 | one.
|
---|
79 | </p>
|
---|
80 | <fig id="fig-snapshots-list">
|
---|
81 | <title>Snapshots List For a Virtual Machine</title>
|
---|
82 | <image href="images/snapshots-2.png" placement="break"/>
|
---|
83 | </fig>
|
---|
84 | <p>
|
---|
85 | Oracle VM VirtualBox imposes no limits on the number of snapshots
|
---|
86 | you can take. The only practical limitation is disk space on
|
---|
87 | your host. Each snapshot stores the state of the virtual
|
---|
88 | machine and thus occupies some disk space. See
|
---|
89 | <xref href="snapshots-contents.dita#snapshots-contents"/> for details on what is
|
---|
90 | stored in a snapshot.
|
---|
91 | </p>
|
---|
92 | </li>
|
---|
93 | <li>
|
---|
94 | <p>
|
---|
95 | <b outputclass="bold">Restore a snapshot.</b> In the
|
---|
96 | Snapshots window, select the snapshot you have taken and
|
---|
97 | click <b outputclass="bold">Restore</b> in the
|
---|
98 | toolbar. By restoring a snapshot, you go back or forward in
|
---|
99 | time. The current state of the machine is lost, and the
|
---|
100 | machine is restored to the exact state it was in when the
|
---|
101 | snapshot was taken.
|
---|
102 | </p>
|
---|
103 | <note>
|
---|
104 | <p>
|
---|
105 | Restoring a snapshot will affect the virtual hard drives
|
---|
106 | that are connected to your VM, as the entire state of the
|
---|
107 | virtual hard drive will be reverted as well. This means
|
---|
108 | also that all files that have been created since the
|
---|
109 | snapshot and all other file changes <i>will be
|
---|
110 | lost. </i>In order to prevent such data loss while
|
---|
111 | still making use of the snapshot feature, it is possible
|
---|
112 | to add a second hard drive in
|
---|
113 | <i>write-through</i> mode using the
|
---|
114 | <userinput>VBoxManage</userinput> interface and use it to
|
---|
115 | store your data. As write-through hard drives are
|
---|
116 | <i>not</i> included in snapshots, they
|
---|
117 | remain unaltered when a machine is reverted. See
|
---|
118 | <xref href="hdimagewrites.dita#hdimagewrites"/>.
|
---|
119 | </p>
|
---|
120 | </note>
|
---|
121 | <p>
|
---|
122 | To avoid losing the current state when restoring a snapshot,
|
---|
123 | you can create a new snapshot before the restore operation.
|
---|
124 | </p>
|
---|
125 | <p>
|
---|
126 | By restoring an earlier snapshot and taking more snapshots
|
---|
127 | from there, it is even possible to create a kind of
|
---|
128 | alternate reality and to switch between these different
|
---|
129 | histories of the virtual machine. This can result in a whole
|
---|
130 | tree of virtual machine snapshots.
|
---|
131 | </p>
|
---|
132 | </li>
|
---|
133 | <li>
|
---|
134 | <p>
|
---|
135 | <b outputclass="bold">Delete a snapshot.</b> This
|
---|
136 | does not affect the state of the virtual machine, but only
|
---|
137 | releases the files on disk that Oracle VM VirtualBox used to store
|
---|
138 | the snapshot data, thus freeing disk space. To delete a
|
---|
139 | snapshot, select the snapshot name in the Snapshots window
|
---|
140 | and click <b outputclass="bold">Delete</b> in the
|
---|
141 | toolbar. Snapshots can be deleted even while a machine is
|
---|
142 | running.
|
---|
143 | </p>
|
---|
144 | <note>
|
---|
145 | <p>
|
---|
146 | Whereas taking and restoring snapshots are fairly quick
|
---|
147 | operations, deleting a snapshot can take a considerable
|
---|
148 | amount of time since large amounts of data may need to be
|
---|
149 | copied between several disk image files. Temporary disk
|
---|
150 | files may also need large amounts of disk space while the
|
---|
151 | operation is in progress.
|
---|
152 | </p>
|
---|
153 | </note>
|
---|
154 | <p>
|
---|
155 | There are some situations which cannot be handled while a VM
|
---|
156 | is running, and you will get an appropriate message that you
|
---|
157 | need to perform this snapshot deletion when the VM is shut
|
---|
158 | down.
|
---|
159 | </p>
|
---|
160 | </li>
|
---|
161 | </ol>
|
---|
162 | </body>
|
---|
163 |
|
---|
164 | </topic>
|
---|