Windows 10/Server 2012 Bare-metal recovery

709 views
Skip to first unread message

Alistair Sutter

unread,
Jul 10, 2018, 5:14:56 PM7/10/18
to bareos-users
Hello,

I have been getting the hang of bareos.
Found all my configuration files and modified them.

I made a Windows 10 VM just to back it up and restore it.

I managed to make a full/differential backup schedule for it and made a full backup. I then proceeded to reinstalling Windows 10 in hopes of restoring it later with my full backup and configuration files.

After reinstalling Windows; installing bareos and copying configuration files was not enough. I needed to change the hostname for the computer, re-install bareos and then copy my configurations. (Otherwise the bareos installer was trying to use the new hostname which was invalid for my configuration files.)

Once all that was done I could go in bconsole, do status all, and probably do a full backup. And no errors would show up relating connections between various Bareos components.

My problem is that, as expected, the restore doesn't work with a running installation. A whole bunch of files never get copied because of permission errors. Which means the restoration is incomplete.
I need to run the system off a live cd/usb and then restore.
I am unaware of any live cd/usb for Windows which can be customized. (For windows either you install either you don't install)
Do I need to make a separate windows installation on say.. A flash drive? Install bareos on the flash drive installation and then try to restore from that?

Do I need to use a Linux live usb/cd for this instead? I am very familiar with Linux and would rather use Linux but in this scenario I have to backup/restore a windows machine. Is it possible to restore a Windows backup from a Linux usb/cd with bareos?

Message has been deleted

Alistair Sutter

unread,
Jul 12, 2018, 8:09:21 PM7/12/18
to bareos-users
I spent more than a week trying to make this work.

Made VMs and tested many different scenarios.

Unfortunately, as far as I can tell, Bareos is incapable of backing up a full Windows System Partition.

Furthermore I would not recommend this software to anyone since it appears to have been coded without rigor. Error messages don't give enough information to debug.
The documentation is mostly an "edited copy-pasta", very obscure, not concise enough and contains mistakes which speaks for the sloppiness of the developers.

I do not recommend this software to anyone. Find another solution if possible.

Cheers.

lst_...@kwsoft.de

unread,
Jul 13, 2018, 6:30:35 AM7/13/18
to bareos...@googlegroups.com

Zitat von Alistair Sutter <alistai...@gmail.com>:
If done right it works. Windows is not able to restore a "running"
system partition, but it is no problem to backup. For the restore you
have to use a Windows starting from another partition and restoring to
the prepared restore target by relocation. Done that lately for
Windows 2003 ... Windows 2012R2 without problems.

But you are certainly free to move on and use something which better
fit your needs.



Alistair Sutter

unread,
Jul 13, 2018, 11:12:38 AM7/13/18
to bareos-users

It didn't work with Windows 10. I understand it can't restore a running partition and I ran a second partition in multiple scenarios, all of which failed.

I used file relocation to restore to the target from a clone of the original partition.

I even tried restoring to a formatted drive so that it wouldn't conflict with any existing files. The restoration failed every time. A few times with fd errors, whatever that means, and at least once with an SD error.

It managed to copy most of the bytes so I still tried to run the "restored partition" but it just didn't work.

Could this have something to do with being run inside a VM? is bareos not able to run inside a VM?
Is it not able to backup from a running partition? Was my backup corrupted in the first place?

Bruno Friedmann

unread,
Jul 14, 2018, 12:04:56 PM7/14/18
to bareos...@googlegroups.com
Nope this work very well
> is bareos not able to run inside a VM?
Same this work 100% correctly
> Is it not able to backup from a running partition?
Same work 100%, if you try to restore data files and so it will work
> Was my backup corrupted in the first place?
I don't think so.

Now to return to the main aspect, Bare-metal recovery for windows.
I was able (but was a 2012R2 Server) to restore it, with a dedicated pxe
windows recovery system having all the drivers and bareos configuration ok
This running system is using X: as main drive, and I restore the previously
backuped system to its original location C:
A special care as to be made for the NTFS ID which should be the same to be
able to reboot more easily (also the vm was strictly identical).

I don't repeat this with newer windows (10, 2016) so perhaps there's again
things that have changed ;-)

Actually it seem to still exist
https://docs.microsoft.com/en-us/windows-hardware/manufacture/desktop/winpe-intro

Perhaps it will help you to achieve this (hard) part to restore a Windows
system
--

Bruno Friedmann
Ioda-Net Sàrl www.ioda-net.ch
Bareos Partner, openSUSE Member, fsfe fellowship
GPG KEY : D5C9B751C4653227
irc: tigerfoot

openSUSE Tumbleweed
Linux 4.16.9-1-default x86_64 GNU/Linux, nvidia: 390.59
Qt: 5.10.0, KDE Frameworks: 5.46.0, Plasma: 5.12.5, kmail2 5.8.1



Alistair Sutter

unread,
Jul 16, 2018, 2:08:13 PM7/16/18
to bareos-users
Do you mean you made a Windows PXE USB and installed Bareos on it and then ran the restore?
> This running system is using X: as main drive, and I restore the previously
> backuped system to its original location C:
> A special care as to be made for the NTFS ID which should be the same to be
> able to reboot more easily (also the vm was strictly identical).
With my previous test I used two identical VM images, Image B could not restore on Image A
>
> I don't repeat this with newer windows (10, 2016) so perhaps there's again
> things that have changed ;-)
That is quite possible, I attached the output I get after a restore:

>
> Actually it seem to still exist
> https://docs.microsoft.com/en-us/windows-hardware/manufacture/desktop/winpe-intro
>
> Perhaps it will help you to achieve this (hard) part to restore a Windows
> system
> --
Would you mind pointing me to some other references which use Bareos with Win PXE?
>
> Bruno Friedmann
> Ioda-Net Sàrl www.ioda-net.ch
> Bareos Partner, openSUSE Member, fsfe fellowship
> GPG KEY : D5C9B751C4653227
> irc: tigerfoot
>
> openSUSE Tumbleweed
> Linux 4.16.9-1-default x86_64 GNU/Linux, nvidia: 390.59
> Qt: 5.10.0, KDE Frameworks: 5.46.0, Plasma: 5.12.5, kmail2 5.8.1

Thank you.

bareosrestore.png

Alistair Sutter

unread,
Jul 17, 2018, 7:36:16 PM7/17/18
to bareos-users
On Saturday, July 14, 2018 at 9:04:56 AM UTC-7, Bruno Friedmann wrote:
Made a WinPE ISO/Flash drive and managed to boot from it.

Could use some help to install bareos on the WinPE image.
I am currently using this documentation:
https://docs.microsoft.com/en-us/windows-hardware/manufacture/desktop/winpe-mount-and-customize

No idea if the #Add An App section is relevant or not but that is what I will try next. (PS: even if copying existing files works I will probably need the services too since bareos relies on 3 different services.)

Bruno Friedmann

unread,
Jul 18, 2018, 2:46:57 AM7/18/18
to bareos...@googlegroups.com
> Made a WinPE ISO/Flash drive and managed to boot from it.
>
> Could use some help to install bareos on the WinPE image.
> I am currently using this documentation:
>
> https://docs.microsoft.com/en-us/windows-hardware/manufacture/desktop/winpe
> -mount-and-customize
>
> No idea if the #Add An App section is relevant or not but that is what I
> will try next. (PS: even if copying existing files works I will probably
> need the services too since bareos relies on 3 different services.)

Yes I believe your on the right track. For Bareos I've included only the
filedaemon because there's no need for director or storage in that part.
Proceed step by step, bareos-fd can also run foreground (-f flag) so no need
for a service, and there's chance that you will need to inject the
configuration of the desired target anyway.

I've been used to add curl.exe 7zip and have the configuration available
on some accessible web server for that part.

Alistair Sutter

unread,
Jul 18, 2018, 3:00:48 PM7/18/18
to bareos-users
I don't know which version you are speaking about but with the latest bareos version the -f flag does not exist. Is there a portable bareos version I am unaware of?

> for a service, and there's chance that you will need to inject the
> configuration of the desired target anyway.

I tried this and the client configuration was not enough, it needed to include Director and Messages resources.
Even then, my output was just a black line. bareos-fd.exe gave me no output whatsoever, no interactivity, so no possibility to run a restore.
If I tried with Connection From Client To Director=yes then I would get error messages saying it could not connect to the machine on the network.

> I've been used to add curl.exe 7zip and have the configuration available
> on some accessible web server for that part.
I should probably add notepad++ to my winPE image.
> --
>
> Bruno Friedmann
> Ioda-Net Sàrl www.ioda-net.ch
> Bareos Partner, openSUSE Member, fsfe fellowship
> GPG KEY : D5C9B751C4653227
> irc: tigerfoot
>
> openSUSE Tumbleweed
> Linux 4.16.9-1-default x86_64 GNU/Linux, nvidia: 390.59
> Qt: 5.10.0, KDE Frameworks: 5.46.0, Plasma: 5.12.5, kmail2 5.8.1

I don't understand how to make filedaemon run standalone. It doesn't look possible to me since bareos-fd.exe offers no interactivity like bconsole. Am I missing something?

There is literally 0 bits of information about what I am trying to do on doc.bareos.org. I really wish there was a detailed how-to on there explaining how to restore a Windows 10/Windows Server 2012 bareos server from bare-metal. It would have saved me a big amount of time. I am trying to use this for work and the more I try, the more it doesn't seem viable. I don't have the time to set this up for months.
Reply all
Reply to author
Forward
0 new messages