Azure Backup / Restore with Powershell

%3CLINGO-SUB%20id%3D%22lingo-sub-91804%22%20slang%3D%22en-US%22%3EAzure%20Backup%20%2F%20Restore%20with%20Powershell%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-91804%22%20slang%3D%22en-US%22%3E%3CP%3EHi%2C%20i%20want%20to%20restore%20a%20file%20with%20powershell.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EMy%20code%20is%3A%3C%2FP%3E%3CPRE%3E%24source%20%3D%20Get-OBRecoverableSource%0A%24rps%20%3D%20Get-OBRecoverableItem%20-Source%20%24source%5B0%5D%0A%24filesFolders%20%3D%20Get-OBRecoverableItem%20%24rps%5B0%5D%0A%0A%24item%20%3D%20New-OBRecoverableItem%20%24rps%5B0%5D%20%22DATEV%5CDATEN%5CDATEVDMS%5CDATA%5CSTANDARD%5CLW01%5CDATA%22%20%24false%0A%0A%24recovery_option%20%3D%20New-OBRecoveryOption%20-DestinationPath%20C%3A%5CRESTORECHECK%20-OverwriteType%20Skip%20-SkipRestoreSecurity%20%0A%0AStart-OBRecovery%20-RecoverableItem%20%24item%20-RecoveryOption%20%24recover_option%20%3C%2FPRE%3E%3CP%3Emy%20destination%20folder%20is%20c%3A%5Crestorecheck%3C%2FP%3E%3CP%3Ethe%20task%20runs%20without%20error%26nbsp%3B%3C%2FP%3E%3CDIV%20class%3D%22lia-spoiler-container%22%3E%3CA%20class%3D%22lia-spoiler-link%22%20href%3D%22%23%22%20rel%3D%22nofollow%20noopener%20noreferrer%22%20target%3D%22_blank%22%3ESpoiler%3C%2FA%3E%3CNOSCRIPT%3E%20(Highlight%20to%20read)%3C%2FNOSCRIPT%3E%3CDIV%20class%3D%22lia-spoiler-border%22%3E%3CDIV%20class%3D%22lia-spoiler-content%22%3EEstimating%20size%20of%20backup%20items...%3CBR%20%2F%3EEstimating%20size%20of%20backup%20items...%3CBR%20%2F%3EEstimating%20size%20of%20backup%20items...%3CBR%20%2F%3EEstimating%20size%20of%20backup%20items...%3CBR%20%2F%3EEstimating%20size%20of%20backup%20items...%3CBR%20%2F%3EEstimating%20size%20of%20backup%20items...%3CBR%20%2F%3EEstimating%20size%20of%20backup%20items...%3CBR%20%2F%3EEstimating%20size%20of%20backup%20items...%3CBR%20%2F%3EEstimating%20size%20of%20backup%20items...%3CBR%20%2F%3EEstimating%20size%20of%20backup%20items...%3CBR%20%2F%3EEstimating%20size%20of%20backup%20items...%3CBR%20%2F%3EEstimating%20size%20of%20backup%20items...%3CBR%20%2F%3EEstimating%20size%20of%20backup%20items...%3CBR%20%2F%3EEstimating%20size%20of%20backup%20items...%3CBR%20%2F%3EEstimating%20size%20of%20backup%20items...%3CBR%20%2F%3EEstimating%20size%20of%20backup%20items...%3CBR%20%2F%3EEstimating%20size%20of%20backup%20items...%3CBR%20%2F%3ETransferring%20data...%3CBR%20%2F%3ETransferring%20data...%3CBR%20%2F%3ETransferring%20data...%3CBR%20%2F%3ETransferring%20data...%3CBR%20%2F%3ETransferring%20data...%3CBR%20%2F%3ETransferring%20data...%3CBR%20%2F%3ETransferring%20data...%3CBR%20%2F%3ETransferring%20data...%3CBR%20%2F%3EJob%20completed.%3CBR%20%2F%3EThe%20recovery%20operation%20completed%20successfully.%3C%2FDIV%3E%3CNOSCRIPT%3E%3CDIV%20class%3D%22lia-spoiler-noscript-container%22%3E%3CDIV%20class%3D%22lia-spoiler-noscript-content%22%3EEstimating%20size%20of%20backup%20items...Estimating%20size%20of%20backup%20items...Estimating%20size%20of%20backup%20items...Estimating%20size%20of%20backup%20items...Estimating%20size%20of%20backup%20items...Estimating%20size%20of%20backup%20items...Estimating%20size%20of%20backup%20items...Estimating%20size%20of%20backup%20items...Estimating%20size%20of%20backup%20items...Estimating%20size%20of%20backup%20items...Estimating%20size%20of%20backup%20items...Estimating%20size%20of%20backup%20items...Estimating%20size%20of%20backup%20items...Estimating%20size%20of%20backup%20items...Estimating%20size%20of%20backup%20items...Estimating%20size%20of%20backup%20items...Estimating%20size%20of%20backup%20items...Transferring%20data...Transferring%20data...Transferring%20data...Transferring%20data...Transferring%20data...Transferring%20data...Transferring%20data...Transferring%20data...Job%20completed.The%20recovery%20operation%20completed%20successfully.%3C%2FDIV%3E%3C%2FDIV%3E%3C%2FNOSCRIPT%3E%3C%2FDIV%3E%3C%2FDIV%3E%3CP%3Ebut%20i%20have%20no%20file%20in%20the%20destination%20folder%20%3B-(%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-91804%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EData%20%26amp%3B%20Storage%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EPowerShell%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-91857%22%20slang%3D%22en-US%22%3ERe%3A%20Azure%20Backup%20%2F%20Restore%20with%20Powershell%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-91857%22%20slang%3D%22en-US%22%3Ethe%20script%20restore%20only%20in%20the%20orginal%20folder%20(filename%20%2B%20timestamp)%3C%2FLINGO-BODY%3E
Occasional Contributor

Hi, i want to restore a file with powershell.

 

My code is:

$source = Get-OBRecoverableSource
$rps = Get-OBRecoverableItem -Source $source[0]
$filesFolders = Get-OBRecoverableItem $rps[0]

$item = New-OBRecoverableItem $rps[0] "DATEV\DATEN\DATEVDMS\DATA\STANDARD\LW01\DATA" $false

$recovery_option = New-OBRecoveryOption -DestinationPath C:\RESTORECHECK -OverwriteType Skip -SkipRestoreSecurity 

Start-OBRecovery -RecoverableItem $item -RecoveryOption $recover_option 

my destination folder is c:\restorecheck

the task runs without error 

Spoiler
Estimating size of backup items...
Estimating size of backup items...
Estimating size of backup items...
Estimating size of backup items...
Estimating size of backup items...
Estimating size of backup items...
Estimating size of backup items...
Estimating size of backup items...
Estimating size of backup items...
Estimating size of backup items...
Estimating size of backup items...
Estimating size of backup items...
Estimating size of backup items...
Estimating size of backup items...
Estimating size of backup items...
Estimating size of backup items...
Estimating size of backup items...
Transferring data...
Transferring data...
Transferring data...
Transferring data...
Transferring data...
Transferring data...
Transferring data...
Transferring data...
Job completed.
The recovery operation completed successfully.

but i have no file in the destination folder ;-(

1 Reply
the script restore only in the orginal folder (filename + timestamp)