none
Help, I deleted a computer from the console RRS feed

  • Question

  • Is there a way to recover the data from the dat files after you delete a computer from the console?  I backed up a machine, and before I could get the data off of the backup I accidently deleted the machine.  To make matters worse I formatted the machine and added windows 7 to it so I dont have the data on the machine anymore either.

    I still have the 700 gigs of dat files, but no way to open them.

    I have a sinking feeling that I am hosed, but would love to find out i am not.

    Thursday, May 7, 2009 11:13 PM

Answers

  • Hi,
    that's not good. If you have made no manual backup of your backup database, the chances are really bad to access that backup. There is no approved method for recover deleted machines, so the following are only ideas.
    (Eventually there is a very small chance, that Shadow copies are enabled on your drives and you can revert the backup database folder, but since Shadow copies are not supported and are not working reliable in WHS, I don't think so.)

    You can try to boot from the Windows Home Server Restore CD (before the automated backup cleanup on Sunday happens) and see, if this machine can still be selected and restored (or run ClientRestoreWizard.exe on one of the clients from C:\Program Files\Windows Home Server) and if it can, perform the restore.

    The clients are stored in the servers registry under HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows Home Server\Transport\Clients. The problem is, that they are stored initially with a GUID. Maybe you can figure this GUID and the subkeys/values out, if shadow copies have been enabled on your server before:
    • On the server desktop click Start/Run and type \\server\d$. This will open drive D: on your server via the share (replace server with the name of your server).
    • Open folders and right click the subfolder {378AE094-F4CA-4D9B-BDA5-649D6F738276}. Select Properties. If you get a Previous Versions tab shown, you may be lucky (shadow copies are enabled in this case) and can open a snapshot from before the deletion. (If not, this method has already failed and you can stop here.)
    • In the file whs.reg in the snapshot of that folder you should find all the information necessary to restore the key from the deleted machine - do not import more than this part into the registry. Instead copy the WHS.REG to another location, edit it in notepad (do not double click the file!) by removing all lines besides the header and the related key and its contents and import it.  (Since I never tested this, importing this key may not be sufficient or even break your server, but if, this should be done before the backup cleanup on Sunday happens.)
    • Reboot the server after that change and check, if the PC is back in the console and the backups can be accessed.
    Good luck and best greetings from Germany
    Olaf
    Friday, May 8, 2009 8:00 AM
    Moderator
  • My worst fears have come to life. Shadow copy was not setup so I cannot continue past bullet point 2 in Olaf's post and to make matters even worse, I shut the machine down before I went to bed last night.

    Brubber, I will be glad to try your ideas even though I shutdown my machine. BTW Its a home build WHS.

    Thanks again for all the help guys.  I just hate that I learned such a hard lesson early on in my trial of windows home server.


    If there's really no previous versions you're out of luck.

    PLEASE NOTE: Home built WHS will automatically create shadow copies, even if you did not set this up yourself, at least if you have built your server with a DVD that has a version of WHS without Powerpack1. 

    To check if there are any previous version please do as Olaf suggested, logon to your server, then in explorer address bar type \\yourservername\d$, hit enter. Browse to the folder "folders", right click any subfolder, select properties, then previous versions tab.

    If there are previous versions but you are unable to access / open them there is a way to regain access to them, it's described in detail overhere: How to regain access to previous version of files in WHS shares

    IF you are able to access a previous version from a point in time before you deleted the computer:

    Next to restoring the client key as described by Olaf you will need to recover a number of files that were deleted from the folder D:\folders\{00008086-058D-4C89-AB57-A7F909A47AB4}. Compare the contents of the current folder with that of the previous version from just before the point in time you deleted the computer from the console. There will be a few *.configdat files and a bunch of *.dat files, starting with the name or GUID of the deleted machine that are missing from the current backup folder.

    Before you start copying these files to the current backup database folder you should open a command shell on your WHS, then  type net stop pdl and hit Enter then type net stop whsbackup and hit Enter

    After copying the files reboot your server.

    Note: please have a look at this Add-in. It might help you prevent this type of disaster in future, at least of your backu db isn't too big.
    Friday, May 8, 2009 4:00 PM
    Moderator

All replies

  • Hi,
    that's not good. If you have made no manual backup of your backup database, the chances are really bad to access that backup. There is no approved method for recover deleted machines, so the following are only ideas.
    (Eventually there is a very small chance, that Shadow copies are enabled on your drives and you can revert the backup database folder, but since Shadow copies are not supported and are not working reliable in WHS, I don't think so.)

    You can try to boot from the Windows Home Server Restore CD (before the automated backup cleanup on Sunday happens) and see, if this machine can still be selected and restored (or run ClientRestoreWizard.exe on one of the clients from C:\Program Files\Windows Home Server) and if it can, perform the restore.

    The clients are stored in the servers registry under HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows Home Server\Transport\Clients. The problem is, that they are stored initially with a GUID. Maybe you can figure this GUID and the subkeys/values out, if shadow copies have been enabled on your server before:
    • On the server desktop click Start/Run and type \\server\d$. This will open drive D: on your server via the share (replace server with the name of your server).
    • Open folders and right click the subfolder {378AE094-F4CA-4D9B-BDA5-649D6F738276}. Select Properties. If you get a Previous Versions tab shown, you may be lucky (shadow copies are enabled in this case) and can open a snapshot from before the deletion. (If not, this method has already failed and you can stop here.)
    • In the file whs.reg in the snapshot of that folder you should find all the information necessary to restore the key from the deleted machine - do not import more than this part into the registry. Instead copy the WHS.REG to another location, edit it in notepad (do not double click the file!) by removing all lines besides the header and the related key and its contents and import it.  (Since I never tested this, importing this key may not be sufficient or even break your server, but if, this should be done before the backup cleanup on Sunday happens.)
    • Reboot the server after that change and check, if the PC is back in the console and the backups can be accessed.
    Good luck and best greetings from Germany
    Olaf
    Friday, May 8, 2009 8:00 AM
    Moderator
  • Using the method Olaf suggest you will get the machine back in the WHS console, however I expect you will still not be able to view the backups since some essential files will be missing from the database (these are deleted the moment you remove the client from the console). There may be a way to recover these also, I will try and post more details in 6 - 7 hours from now.

    In the mean time please do NOT reboot your server.

    Please let me know if it's home built server or OEM like HP Mediasmart.

    Friday, May 8, 2009 10:03 AM
    Moderator
  • My worst fears have come to life. Shadow copy was not setup so I cannot continue past bullet point 2 in Olaf's post and to make matters even worse, I shut the machine down before I went to bed last night.

    Brubber, I will be glad to try your ideas even though I shutdown my machine. BTW Its a home build WHS.

    Thanks again for all the help guys.  I just hate that I learned such a hard lesson early on in my trial of windows home server.

    Friday, May 8, 2009 2:31 PM
  • My worst fears have come to life. Shadow copy was not setup so I cannot continue past bullet point 2 in Olaf's post and to make matters even worse, I shut the machine down before I went to bed last night.

    Brubber, I will be glad to try your ideas even though I shutdown my machine. BTW Its a home build WHS.

    Thanks again for all the help guys.  I just hate that I learned such a hard lesson early on in my trial of windows home server.


    If there's really no previous versions you're out of luck.

    PLEASE NOTE: Home built WHS will automatically create shadow copies, even if you did not set this up yourself, at least if you have built your server with a DVD that has a version of WHS without Powerpack1. 

    To check if there are any previous version please do as Olaf suggested, logon to your server, then in explorer address bar type \\yourservername\d$, hit enter. Browse to the folder "folders", right click any subfolder, select properties, then previous versions tab.

    If there are previous versions but you are unable to access / open them there is a way to regain access to them, it's described in detail overhere: How to regain access to previous version of files in WHS shares

    IF you are able to access a previous version from a point in time before you deleted the computer:

    Next to restoring the client key as described by Olaf you will need to recover a number of files that were deleted from the folder D:\folders\{00008086-058D-4C89-AB57-A7F909A47AB4}. Compare the contents of the current folder with that of the previous version from just before the point in time you deleted the computer from the console. There will be a few *.configdat files and a bunch of *.dat files, starting with the name or GUID of the deleted machine that are missing from the current backup folder.

    Before you start copying these files to the current backup database folder you should open a command shell on your WHS, then  type net stop pdl and hit Enter then type net stop whsbackup and hit Enter

    After copying the files reboot your server.

    Note: please have a look at this Add-in. It might help you prevent this type of disaster in future, at least of your backu db isn't too big.
    Friday, May 8, 2009 4:00 PM
    Moderator