[fixed] Recover to backed up snapshot

This is for discussing general topics about how to use VirtualBox.
Locked
alexus_94
Posts: 5
Joined: 15. Sep 2021, 22:22

[fixed] Recover to backed up snapshot

Post by alexus_94 »

Mod edit: originally posted on "Discuss the 6.1.26 release"

Всем привет.
Ситуация...
Есть софт, который должен вычислять кое что до посинения (возможно годами).
Ну например сколько цифер после запятой у числа пи ))) В книгу рекордов хочу попасть )))
Но это неважно.
Для этого запустил этот софт в виртуалке, чтобы периодически делать снимки системы и иногда перезагружать комп (есть такая потребность).
Снимки делаются, все хорошо, а я их бэкаплю.
Но...
Проблема...
При запуске с того места, на котором виртуалка "засыпала" пропадает файл ее последнего состояния. Но у меня есть бэкап этого файла.
А с него запускаться не хочет. Нет нужной кнопки для выбора бэкапа, а если усыплять и подменивать файл состояния - матерится.
Вопрос-задача...
Как быть, если виртуалка проснулась, сожрала свой тот файл и во время работы вырубили свет?
Как мне с того же состояния ее снова запустить?

===============================================

Hello everyone.
The situation... there
is software that should calculate something until it turns blue (perhaps for years).
Well, for example, how many digits after the decimal point of the number pi ))) I want to get into the book of records )))
But it doesn't matter.
To do this, I launched this software in a virtual machine to periodically take snapshots of the system and sometimes restart the computer (there is such a need).
The pictures are being taken, everything is fine, and I will backup them.
But...
The problem...
When starting from the place where the virtual machine "fell asleep", the file of its last state disappears. But I have a backup of this file.
And he doesn't want to start from it. There is no necessary button for selecting a backup, and if you put to sleep and replace the status file , it swears.
The question is the task...
What to do if the virtual machine woke up, ate its own file and turned off the light while working?
How can I start it again from the same state?
scottgus1
Site Moderator
Posts: 20965
Joined: 30. Dec 2009, 20:14
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Windows, Linux

Re: Recover to backed up snapshot

Post by scottgus1 »

alexus_94 wrote:periodically take snapshots ... and I will backup them.
Snapshots are not backups. They are like time travel markers for the VM. Regrettably, your use of snapshots is not what they are used for.
alexus_94 wrote:But I have a backup of this file. And he doesn't want to start from it. There is no necessary button for selecting a backup,
Correct. One cannot import a snapshot into a VM for restoration purposes.

You can use Mpack's CloneVDI, gather together the base disk file and all the snapshot files, follow the directions in CloneVDI to make a full flattened clone disk file of the snapshot chain for a new VM. Hopefully the snapshot chain will be complete to make a new up-to-date VM.

Then stop using snapshots for backup. The best backup of a Virtualbox VM is a full file & folder copy of a completely shut-down (not save-stated) VM folder, containing all the files therein, as well as any disk files that may reside outside the folder.
alexus_94
Posts: 5
Joined: 15. Sep 2021, 22:22

Re: Recover to backed up snapshot

Post by alexus_94 »

В общем мне такой вариант с полным бекапом всей виртуалки не подходит.
Какой смысл тогда в том снимке системы? Только ради перезагрузки физической системы?
Ушел на VMware Workstation Pro, там с этим проблем нет.
Можно запустить любой снимок с любой датой создания и не нужно дополнительно делать бэкап.

=========================================

In general, this option with a full backup of the entire virtual machine does not suit me.
What's the point of that system snapshot then? Just for the sake of rebooting the physical system?
I went to VMware Workstation Pro, there are no problems with this there.
You can run any snapshot with any creation date and do not need to make an additional backup.
mpack
Site Moderator
Posts: 39156
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP

Re: Recover to backed up snapshot

Post by mpack »

Snapshots are like restore points that Windows takes before installing new software, or like the "Previous Versions" features of Windows and MacOS.

They allow you to revert A WORKING VIRTUAL MACHINE to a previous state, say after testing out some malware inside the VM.

They do absolutely nothing useful if THE PHYSICAL PC is damaged or corrupted, which is what happened in your case.

It is exactly the same with Windows Restore Points - they do absolutely nothing useful if the hard disk dies.

I don't know any experienced user who relies on snapshots for anything. True backups provide everything that a snapshot does, are only slightly less convenient to create, but offer a whole lot more in robustness and usefulness.
alexus_94
Posts: 5
Joined: 15. Sep 2021, 22:22

Re: Recover to backed up snapshot

Post by alexus_94 »

Уже все-равно что там и как устроено.
Виртуалка работает на RAID, которая умеет делать на лету нужные мне снимки даже не останавливая машину. Написал скрипт для бэкапа каждые 5 минут, теперь стал не нужен UPS )))
Разработчикам VirtualBox еще есть чем заняться ;-)

===============================

It's all the same what's there and how it works.
The virtual machine runs on RAID, which is able to take the pictures I need on the fly without even stopping the machine. I wrote a script for a backup every 5 minutes, now I don't need UPS anymore )))
VirtualBox developers still have something to do ;-)
scottgus1
Site Moderator
Posts: 20965
Joined: 30. Dec 2009, 20:14
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Windows, Linux

Re: Recover to backed up snapshot

Post by scottgus1 »

Is your VM working now?

Re what the Virtualbox developers have to do, consider also the users assuming they are using the correct tool for the job when they are not.

A hammer can drive a screw, but not well, not properly, and will likely damage something. However a screwdriver is the correct tool for the job.

Snapshots are used for taking the VM back and forth in time, so to speak. One can roll back to an earlier situation in the VM's life, then return to another time or the present. This is the job that snapshots are designed for.

Snapshots are not designed to be backups. A single snapshot disk file only stores changed disk sectors. It is not possible to restore an entire VM's data from a snapshot. Snapshots are not backups and never were backups.

The correct tool to use for backup of a running VM is not provided by Virtualbox. This tool is 3rd-party backup software you obtain and run inside the VM's OS, and the backups made by that software can be sent out of the VM to other media over a network.

We strongly recommend that you use the correct tool for your backup needs. Virtualbox snapshots are not that tool.
alexus_94
Posts: 5
Joined: 15. Sep 2021, 22:22

Re: Recover to backed up snapshot

Post by alexus_94 »

Уже использую нужный, а значит правильный для меня инструмент для моей задачи. И это не отвертка, не молоток и не ваша виртуалка.

=========================

I am already using the right tool for my task, which means that it is the right one for me. And this is not a screwdriver, not a hammer and not your virtual machine.
scottgus1
Site Moderator
Posts: 20965
Joined: 30. Dec 2009, 20:14
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Windows, Linux

Re: Recover to backed up snapshot

Post by scottgus1 »

OK. Is your VM running now? Has the problem been fixed?
alexus_94
Posts: 5
Joined: 15. Sep 2021, 22:22

Re: Recover to backed up snapshot

Post by alexus_94 »

Да. Но не ваша. Уже написал какая полностью подошла для моей задачи.
scottgus1
Site Moderator
Posts: 20965
Joined: 30. Dec 2009, 20:14
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Windows, Linux

Re: Recover to backed up snapshot

Post by scottgus1 »

OK, very good.

For all future readers, though Alexus disregarded the advice they came here to ask for, please don't use snapshots for backups. Snapshots do not carry all information that needs to be restored in a VM and will require extensive customization of the XML in the .vbox file to integrate an orphaned snapshot file into a working VM. And if there is missing data between the snapshot file and the VM it is being integrated into, the VM's data may be corrupted or the VM will fail to boot. This is why there is no command or button to load a snapshot disk file.

An illustration: One can drive 160km/h down a city street and not have an accident, run over a child, or get stopped by the police. One might even drive like this several times without trouble. But trouble will come, one day.

In the same way, a "backup" routine that relies on snapshots will fail sometime or other. If anyone wishes to discuss the problems that can come with using snapshots (and will actually listen to the forum gurus instead of trolling them if they say something the poster doesn't agree with or understand) please feel free to start a new topic.
Locked