1

I have took a backup of our live content database using the following command:-

Backup-SPFarm -Directory  \\servername\f  -BackupMethod Full -Item WSS_Content_ea05******15e8  -Verbose

which generated these two compenents:-

  1. spbrtoc xml file
  2. spbr0000 folder which contain a list of .bak files.

now i want to restore this content database on our test server ? but not sure that i should specify inside these parameters for the Restore-SPFarm command:-

  • -Directory. should it be referencing the folder or certain file inside the spbr0000 folder?

  • -BackupId. should this be a random number ?

EDIT now i try running this command on test machine:-

Restore-SPFarm -Directory T:\fileserver\farm -RestoreMethod new -Item WSS_Content_copyLive  -Verbose

where the T:\fileserver\farm is a folder which contain the backup folder spbr0000.. and i gave the content database a new name WSS_Content_copyLive, but this script raised the following error:-

Verbose: Using directory: T:\fileserver\farm\spbr0000\.
Verbose: Initializing objects for restore.
Verbose: Initializing SPPersistedObject State
Verbose: Initializing SPPersistedObject State
Verbose: Initializing SPPersistedObject State
Verbose: Initializing SPPersistedObject State
Verbose: Initializing SPPersistedObject State
Verbose: Initializing SPPersistedObject State
Verbose: Initializing SPPersistedObject State
Verbose: Initializing SPPersistedObject State
Verbose: Initializing SPPersistedObject State
Verbose: Initializing SPPersistedObject State
Verbose: Initializing SPPersistedObject State
Verbose: Initializing SPPersistedObject State
Verbose: Initializing SPPersistedObject State
Verbose: Initializing SPPersistedObject State
Verbose: Initializing SPPersistedObject State
Verbose: Initializing SPPersistedObject State
Verbose: Initializing SPPersistedObject State
Verbose: Initializing SPPersistedObject State
Verbose: Initializing SPPersistedObject State
Verbose: Initializing SPPersistedObject State
Verbose: Initializing SPPersistedObject State
Verbose: Initializing SPPersistedObject State
Verbose: Initializing SPPersistedObject State
Verbose: Initializing SPPersistedObject State
Verbose: Initializing SPPersistedObject State
Verbose: Initializing SPPersistedObject State
Verbose: Initializing SPPersistedObject State
Verbose: Initializing SPPersistedObject State
Verbose: Initializing SPPersistedObject State
Verbose: Initializing SPPersistedObject State
Verbose: Initializing SPPersistedObject State
Verbose: Initializing SPPersistedObject State
Verbose: Initializing SPPersistedObject State
Verbose: Initializing SPPersistedObject State
Verbose: Initializing SPPersistedObject State
Verbose: Initializing SPPersistedObject State
Verbose: Initializing SPPersistedObject State
Verbose: Initializing SPPersistedObject State
Verbose: Initializing SPPersistedObject State
Verbose: Initializing SPPersistedObject State
Verbose: Initializing SPPersistedObject State
Verbose: Initializing SPPersistedObject State
Verbose: Initializing SPPersistedObject State
Verbose: Initializing SPPersistedObject State
Verbose: Initializing SPPersistedObject State
Verbose: Initializing SPPersistedObject State
Verbose: Initializing SPPersistedObject State
Verbose: Initializing SPPersistedObject State
Verbose: Initializing SPPersistedObject State
Verbose: Initializing SPPersistedObject State
Verbose: Initializing SPPersistedObject State
Verbose: Initializing SPPersistedObject State
Verbose: Initializing SPPersistedObject State
Verbose: Initializing SPPersistedObject State
Verbose: Initializing SPPersistedObject State
Verbose: Initializing SPPersistedObject State
Verbose: Initializing SPPersistedObject State
Verbose: Initializing SPPersistedObject State
Verbose: Initializing SPPersistedObject State
Verbose: Initializing SPPersistedObject State
Verbose: Initializing SPPersistedObject State
Verbose: Initializing SPPersistedObject State
Verbose: Initializing SPPersistedObject State
Verbose: Initializing SPPersistedObject State
Verbose: Initializing SPPersistedObject State
Verbose: Initializing SPPersistedObject State
Verbose: Initializing SPPersistedObject State
Verbose: Initializing SPPersistedObject State
Verbose: Initializing SPPersistedObject State
Verbose: Initializing SPPersistedObject State
Verbose: Initializing SPPersistedObject State
Verbose: Initializing SPPersistedObject State
Verbose: Initializing SPPersistedObject State
Verbose: Initializing SPPersistedObject State
Verbose: Initializing SPPersistedObject State
Verbose: Initializing SPPersistedObject State
Verbose: Initializing SPPersistedObject State
Verbose: Initializing SPPersistedObject State
Verbose: Initializing SPPersistedObject State
Verbose: Initializing SPPersistedObject State
Verbose: Initializing SPPersistedObject State
Verbose: Initializing SPPersistedObject State
Verbose: Initializing SPPersistedObject State
Verbose: Initializing SPPersistedObject State
Verbose: Initializing SPPersistedObject State
Verbose: Initializing SPPersistedObject State
Verbose: Initializing SPPersistedObject State
Verbose: Initializing SPPersistedObject State
Verbose: Initializing SPPersistedObject State
Verbose: Initializing SPPersistedObject State
Verbose: Initializing SPPersistedObject State
Verbose: Initializing SPPersistedObject State
Verbose: Initializing SPPersistedObject State
Verbose: Initializing SPPersistedObject State
Verbose: Initializing SPPersistedObject State
Verbose: Initializing SPPersistedObject State
Verbose: Initializing SPPersistedObject State
Verbose: Initializing SPPersistedObject State
Verbose: Initializing SPPersistedObject State
Verbose: Initializing SPPersistedObject State
Verbose: Initializing SPPersistedObject State
Verbose: Initializing SPPersistedObject State
Verbose: Initializing SPPersistedObject State
Verbose: Initializing SPPersistedObject State
Verbose: Initializing SPPersistedObject State
Verbose: Initializing SPPersistedObject State
Verbose: Initializing SPPersistedObject State
Verbose: Initializing SPPersistedObject State
Verbose: Initializing SPPersistedObject State
Verbose: Initializing SPPersistedObject State
Verbose: Initializing SPPersistedObject State
Verbose: Initializing SPPersistedObject State
Verbose: Initializing SPPersistedObject State
Verbose: Initializing SPPersistedObject State
Verbose: Initializing SPPersistedObject State
Verbose: Initializing SPPersistedObject State
Verbose: Initializing SPPersistedObject State
Verbose: Initializing SPPersistedObject State
Verbose: Initializing SPPersistedObject State
Verbose: Initializing SPPersistedObject State
Verbose: Initializing SPPersistedObject State
Verbose: Initializing SPPersistedObject State
Verbose: Initializing SPPersistedObject State
Verbose: Initializing SPPersistedObject State
Verbose: Initializing SPPersistedObject State
Verbose: Initializing SPPersistedObject State
Verbose: Initializing SPPersistedObject State
Verbose: Initializing SPPersistedObject State
Verbose: Initializing SPPersistedObject State
Verbose: Initializing SPPersistedObject State
Verbose: Initializing SPPersistedObject State
Verbose: Initializing SPPersistedObject State
Verbose: Initializing SPPersistedObject State
Verbose: Initializing SPPersistedObject State
Verbose: Initializing SPPersistedObject State
Verbose: Initializing SPPersistedObject State
Verbose: Initializing SPPersistedObject State
Verbose: Initializing SPPersistedObject State
Verbose: Initializing SPPersistedObject State
Verbose: Initializing SPPersistedObject State
Verbose: Initializing SPPersistedObject State
Verbose: Initializing SPPersistedObject State
Verbose: Initializing SPPersistedObject State
Verbose: Initializing SPPersistedObject State
Verbose: Initializing SPPersistedObject State
Verbose: Initializing SPPersistedObject State
Verbose: Initializing SPPersistedObject State
Verbose: Initializing SPPersistedObject State
Verbose: Initializing SPPersistedObject State
Verbose: Initializing SPPersistedObject State
Verbose: Initializing SPPersistedObject State
Verbose: Initializing SPPersistedObject State
Verbose: Initializing SPPersistedObject State
Verbose: Initializing SPPersistedObject State
Verbose: Initializing SPPersistedObject State
Verbose: Initializing SPPersistedObject State
Verbose: Initializing SPPersistedObject State
Verbose: Initializing SPPersistedObject State
Verbose: Initializing SPPersistedObject State
Verbose: Initializing SPPersistedObject State
Verbose: Initializing SPPersistedObject State
Verbose: Initializing SPPersistedObject State
Verbose: Initializing SPPersistedObject State
Verbose: Initializing SPPersistedObject State
Verbose: Initializing SPPersistedObject State
Verbose: Initializing SPPersistedObject State
Verbose: Initializing SPPersistedObject State
Verbose: Initializing SPPersistedObject State
Verbose: Initializing SPPersistedObject State
Verbose: Initializing SPPersistedObject State
Verbose: Initializing SPPersistedObject State
Verbose: Initializing SPPersistedObject State
Verbose: Initializing SPPersistedObject State
Verbose: Initializing SPPersistedObject State
Verbose: Initializing SPPersistedObject State
Verbose: Initializing SPPersistedObject State
Verbose: Initializing SPPersistedObject State
Verbose: Initializing SPPersistedObject State
Verbose: Initializing SPPersistedObject State
Verbose: Initializing SPPersistedObject State
Verbose: Initializing SPPersistedObject State
Verbose: Initializing SPPersistedObject State
Verbose: Initializing SPPersistedObject State
Verbose: Initializing SPPersistedObject State
Verbose: Initializing SPPersistedObject State
Verbose: Initializing SPPersistedObject State
Verbose: Initializing SPPersistedObject State
Verbose: Adding WSS_Content_ea05119bb8a4408ab450dcd46d6015e8 to Restore list.
Verbose: Searching for item: Farm\Microsoft SharePoint Foundation Web Applicatio
n\SharePoint - 80\WSS_Content_ea05119bb8a4408ab450dcd46d6015e8.
Verbose: Found 1 item(s).
Verbose: Adding WSS_Content_ea05119bb8a4408ab450dcd46d6015e8 to Restore list.
Verbose: Searching for item: WSS_Content_copyLive.
Verbose: Found 0 item(s).
Restore-SPFarm : Item WSS_Content_copyLive not found.
At line:1 char:1
+ Restore-SPFarm -Directory T:\fileservert\farm -RestoreMethod new -item
WSS_ ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~
    + CategoryInfo          : InvalidData: (Microsoft.Share...dletRestoreFarm:
   SPCmdletRestoreFarm) [Restore-SPFarm], SPException
    + FullyQualifiedErrorId : Microsoft.SharePoint.PowerShell.SPCmdletRestoreF
   arm

VERBOSE: Leaving ProcessRecord Method of Restore-SPFarm.
VERBOSE: Leaving EndProcessing Method of Restore-SPFarm.

EDIT-2 now i tried defining the same content database name as on the live server:-

Restore-SPFarm -Directory T:\fileserver\farm -RestoreMethod new -Item  WSS_Content_ea05119bb8a4408ab450dcd46d6015e8  -Verbose

i got these on the cmd window:-

verbose: Initializing SPPersistedObject State
Verbose: Initializing SPPersistedObject State
Verbose: Initializing SPPersistedObject State
Verbose: Initializing SPPersistedObject State
Verbose: Initializing SPPersistedObject State
Verbose: Initializing SPPersistedObject State
Verbose: Initializing SPPersistedObject State
Verbose: Initializing SPPersistedObject State
Verbose: Initializing SPPersistedObject State
Verbose: Adding WSS_Content_ea05119bb8a4408ab450dcd46d6015e8 to Restore list.
Verbose: Searching for item: Farm\Microsoft SharePoint Foundation Web Applicatio
n\SharePoint - 80\WSS_Content_ea05119bb8a4408ab450dcd46d6015e8.
Verbose: Found 1 item(s).
Verbose: Adding WSS_Content_ea05119bb8a4408ab450dcd46d6015e8 to Restore list.
Verbose: Searching for item: WSS_Content_ea05119bb8a4408ab450dcd46d6015e8.
Verbose: Found 1 item(s).
Change location/name for: Farm\Microsoft SharePoint Foundation Web Application\
SharePoint - 80\WSS_Content_ea05119bb8a4408ab450dcd46d6015e8
        Log file location: (default: L:\Microsoft SQL Server\MSSQL10_50.SPS\MSSQL\Data
):

now i went to my dev machine database,, but i can not find the database insdie the sql server? also from the output i find this

L:\Microsoft SQL Server\MSSQL10_50.SPS\MSSQL\Data

but on my dev this folder does not exists, it is the folder inside the live .. can anyone advice on this please ?

1

You should mentioned the folder name and restore job will pick it up, make sure all the files exist in that folder( mxl and bak)

BackupFolder> is the name and path for the backup folder where the content database was backed up.

https://technet.microsoft.com/en-us/library/ee748604.aspx

BackupId(it is optional Parameter): Specifies the GUID of the backup package that is to be restored. Each backup package has a unique GUID associated with it. The GUID can be seen by using the Get-SPBackupHistory cmdlet to view the backup history. If this parameter is not specified, the most recent backup package in the path that is specified with the Directory parameter is used.

https://technet.microsoft.com/en-us/library/ff607783.aspx

  • 1
    check the answer above, – Waqas Sarwar MVP Feb 15 '16 at 15:53
  • 1
    honestly i am not sure about this, its long time, if i remember correctly you can give whatever name you want. – Waqas Sarwar MVP Feb 15 '16 at 16:06
  • 1
    i guess yes that is the reason – Waqas Sarwar MVP Feb 15 '16 at 17:16
  • 1
    u are running this command on dev server, right? – Waqas Sarwar MVP Feb 15 '16 at 17:45
  • 1
    your live farm is fine as of know, because it throws the error on start. But if you keep using the same account, you may hurt your prod...i.e if you use overwrite switch then it will overwrite the prod...now you can see the impact – Waqas Sarwar MVP Feb 15 '16 at 18:11

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.