VB and Snapshots Question!!!
VB and Snapshots Question!!!
Hello,
Have taken a look at various posts and am now very confused as to how snapshots work and how they are merged or can be merged
Following is my scenario:
(1) Created new VM and installed OS
(2) Created Snapshot 1
(3) Installed OS updates
(4) Created Snapshot 2
(5) Installed various softwares
(6) Created Snapshot 3
My question is – all these snapshots take up a lot of space. Is there a way to merge these snapshots into one?
What I did is on step 6 above, I created Snapshot 3, then closed my VM and selected “revert back to SS3”. Then deleted SS3. Worked well when I opened VM. When I did the same with snapshot 2, it also worked well. However after working for a while, I closed the VM and wanted to revert back to SS1 (the only SS now existing in my list) and all changes made after creating SS1 were gone.
My system – Win7 64-bit host and Win7 32-bit guest.
I'm sure I'm doing something wrong here...
Thanks for your help.
Have taken a look at various posts and am now very confused as to how snapshots work and how they are merged or can be merged
Following is my scenario:
(1) Created new VM and installed OS
(2) Created Snapshot 1
(3) Installed OS updates
(4) Created Snapshot 2
(5) Installed various softwares
(6) Created Snapshot 3
My question is – all these snapshots take up a lot of space. Is there a way to merge these snapshots into one?
What I did is on step 6 above, I created Snapshot 3, then closed my VM and selected “revert back to SS3”. Then deleted SS3. Worked well when I opened VM. When I did the same with snapshot 2, it also worked well. However after working for a while, I closed the VM and wanted to revert back to SS1 (the only SS now existing in my list) and all changes made after creating SS1 were gone.
My system – Win7 64-bit host and Win7 32-bit guest.
I'm sure I'm doing something wrong here...
Thanks for your help.
-
noteirak
- Site Moderator
- Posts: 5231
- Joined: 13. Jan 2012, 11:14
- Primary OS: Debian other
- VBox Version: OSE Debian
- Guest OSses: Debian, Win 2k8, Win 7
- Contact:
Re: VB and Snapshots Question!!!
Snapshots are markers in time. You freeze the state of the VM at that particular time. Then you carry on using it.
If you take another snapshot, you'll freeze the state at that second time, but you'll also have the first marker in time.
Now you take a third snapshot, all good, you carry on, run the VM.
At this point, you have 4 markers in time :
1. current state, that's what is currently running in the VM.
2. Snapshot 3, that's the previous state (from current) to which you can revert back. Revert back means losing your data between now (current state) and Snapshot 3. Deleting Snapshot 3 means losing the possiblity to revert back to Snapshot 3, but keeping your data.
3. Snapshot 2, the state previous to snapshot 3.
4. Snapshot 1, the state previous to snapshot 2.
So basically, this happened :
Current state = SS 3 + n
- Revert back to SS3
Currnet state = SS 3
- deleted SS3
Current state = SS 2 + n (same as SS3 on a timeline)
- reverted to SS 2
Current state = SS 2
- deleted SS 2
Current state = SS1 + n (same as SS2 on a timeline)
- reverted back to SS1
Current state = SS1
So yes, since you're now back to the exact time you've taken SS1, you've effectively lost all your changes since then, since SS1 is older than SS2, which is older than SS3, which is older than NOW.
If you take another snapshot, you'll freeze the state at that second time, but you'll also have the first marker in time.
Now you take a third snapshot, all good, you carry on, run the VM.
At this point, you have 4 markers in time :
1. current state, that's what is currently running in the VM.
2. Snapshot 3, that's the previous state (from current) to which you can revert back. Revert back means losing your data between now (current state) and Snapshot 3. Deleting Snapshot 3 means losing the possiblity to revert back to Snapshot 3, but keeping your data.
3. Snapshot 2, the state previous to snapshot 3.
4. Snapshot 1, the state previous to snapshot 2.
So basically, this happened :
Current state = SS 3 + n
- Revert back to SS3
Currnet state = SS 3
- deleted SS3
Current state = SS 2 + n (same as SS3 on a timeline)
- reverted to SS 2
Current state = SS 2
- deleted SS 2
Current state = SS1 + n (same as SS2 on a timeline)
- reverted back to SS1
Current state = SS1
So yes, since you're now back to the exact time you've taken SS1, you've effectively lost all your changes since then, since SS1 is older than SS2, which is older than SS3, which is older than NOW.
Hyperbox - Virtual Infrastructure Manager - https://apps.kamax.lu/hyperbox/
Manage your VirtualBox infrastructure the free way!
Manage your VirtualBox infrastructure the free way!
Re: VB and Snapshots Question!!!
My n is basically nothing because as soon as I made updates I created a snapshot so when I reverted back to snapshot it was something that I'd created a few seconds back and had made no changes to my machine.
and when I selected delete snapshot VB did some merging of disks and I thought my changes were being merged into previous snapshot.
So, what is the recommended solution?
and when I selected delete snapshot VB did some merging of disks and I thought my changes were being merged into previous snapshot.
So, what is the recommended solution?
-
noteirak
- Site Moderator
- Posts: 5231
- Joined: 13. Jan 2012, 11:14
- Primary OS: Debian other
- VBox Version: OSE Debian
- Guest OSses: Debian, Win 2k8, Win 7
- Contact:
Re: VB and Snapshots Question!!!
yes, when you delete, you merge the current state with the content from the previous snapshot up to the snapshot you deleted. But since you reverted back to it, you basically didn't merge anything, you only prevented another differencial disk to be created again.
Recommended solution? For the merging? If you don't want to keep the markers but want to keep your current state (SS3 +n), simply delete the snapshots, there is no need to revert back.
Recommended solution? For the merging? If you don't want to keep the markers but want to keep your current state (SS3 +n), simply delete the snapshots, there is no need to revert back.
Hyperbox - Virtual Infrastructure Manager - https://apps.kamax.lu/hyperbox/
Manage your VirtualBox infrastructure the free way!
Manage your VirtualBox infrastructure the free way!
Re: VB and Snapshots Question!!!
So, in my scenario (described above), I can delete SS-1 and SS-2 if I need to keep only SS-3 since SS-3 is the state that I need my machine to be in?
I thought I'd read that one cannot delete SS-1.
Thanks for your assistance so far in this.
I thought I'd read that one cannot delete SS-1.
Thanks for your assistance so far in this.
-
mpack
- Site Moderator
- Posts: 39134
- Joined: 4. Sep 2008, 17:09
- Primary OS: MS Windows 10
- VBox Version: VirtualBox+Oracle ExtPack
- Guest OSses: Mostly XP
Re: VB and Snapshots Question!!!
Stop thinking about how snapshots are implemented - that's the programmers job.
From your point of view, so-called snapshots (terrible name inherited from VMWare) are just markers on a historical timeline. You can revert the VM state to any marked time, or if you're sure that'll you'll never want to do that then you can simply delete the marker. Don't worry about what happens when you do so. If you revert then of course you lose everything that you did since placing the marker, so you definitely want to think before doing that.
I should say however that backups are a much simpler and safer way of preserving a past state, and take up much less disk space too since (unlike snapshots) the backup can be offloaded to secondary storage. There's an awful lot of wooly thinking and false economies surrounding the subject of snapshots.
From your point of view, so-called snapshots (terrible name inherited from VMWare) are just markers on a historical timeline. You can revert the VM state to any marked time, or if you're sure that'll you'll never want to do that then you can simply delete the marker. Don't worry about what happens when you do so. If you revert then of course you lose everything that you did since placing the marker, so you definitely want to think before doing that.
I should say however that backups are a much simpler and safer way of preserving a past state, and take up much less disk space too since (unlike snapshots) the backup can be offloaded to secondary storage. There's an awful lot of wooly thinking and false economies surrounding the subject of snapshots.
Re: VB and Snapshots Question!!!
I'm not sure I understand what you're trying to say here and my limited understanding of VB could - not could - IS very well be the cause.mpack wrote:I should say however that backups are a much simpler and safer way of preserving a past state, and take up much less disk space too since (unlike snapshots) the backup can be offloaded to secondary storage. There's an awful lot of wooly thinking and false economies surrounding the subject of snapshots.
Could you please elaborate on the above statement based on my need that I describe below:
My snapshot SS-3 is really the one that I'd like to keep. Do not care about SS-1 and SS-2 since the state of SS-3 is what i need. Now how do I proceed with what you mention above?
Thanks for your assistance
-
noteirak
- Site Moderator
- Posts: 5231
- Joined: 13. Jan 2012, 11:14
- Primary OS: Debian other
- VBox Version: OSE Debian
- Guest OSses: Debian, Win 2k8, Win 7
- Contact:
Re: VB and Snapshots Question!!!
Well instead of taking a snapshot, you would do a backup (a copy of your VM) which you could put back, erasing the current state. The end result is the same - restoring the VM to a certain point in time - but using backups is much safer.
Especially if you don't fully grasp the concepts and pitfalls of snapshots.
Especially if you don't fully grasp the concepts and pitfalls of snapshots.
Hyperbox - Virtual Infrastructure Manager - https://apps.kamax.lu/hyperbox/
Manage your VirtualBox infrastructure the free way!
Manage your VirtualBox infrastructure the free way!
Re: VB and Snapshots Question!!!
I see multiple VDI files - one in my base folder that could be my base vdi, and 2 vdi files in Snapshots folder corresponding to SS-1 and SS-2. Which one should I backup?noteirak wrote:Well instead of taking a snapshot, you would do a backup (a copy of your VM) which you could put back, erasing the current state. The end result is the same - restoring the VM to a certain point in time - but using backups is much safer.
Especially if you don't fully grasp the concepts and pitfalls of snapshots.
-
noteirak
- Site Moderator
- Posts: 5231
- Joined: 13. Jan 2012, 11:14
- Primary OS: Debian other
- VBox Version: OSE Debian
- Guest OSses: Debian, Win 2k8, Win 7
- Contact:
Re: VB and Snapshots Question!!!
All. Backup the VM folder, do not try to backup specific files.
Hyperbox - Virtual Infrastructure Manager - https://apps.kamax.lu/hyperbox/
Manage your VirtualBox infrastructure the free way!
Manage your VirtualBox infrastructure the free way!