restore from azure blob

  • abdalah.mehdoini

    SSC Eights!

    Points: 890

    Good morning all ,

    I must restore my backup from AZURE URL except that I have this error

     RESTORE DATABASE dba
    FROM URL = 'https://xxxxxapsbosl01igacrgt88t6tp.blob.core.windows.net/cosnprsbo1/DBA.BAK'
    WITH CREDENTIAL = 'Backupcredential'
    ,MOVE N'dba_log' TO N'D:\Logs\dba.ldf' ,MOVE N'B1if' TO N'D:\Data\dba.mdf'
    ,REPLACE ;

    i have this error

    sg 3268, Level 16, State 1, Line 9
    Cannot use the backup file 'https://xxxxl01igacrgt88t6tp.blob.core.windows.net/cosnprsbo1/DBA.BAK' because it was originally formatted with sector size 512 and is now on a device with sector size 65536.
    Msg 3013, Level 16, State 1, Line 9
    RESTORE DATABASE is terminating abnormally.

    Completion time: 2020-09-14T21:10:06.4257526+00:00

    Sans titre

    for info the backup was transferred from a machine on premise through azure storage explorer

     

    Sans titre

    thank you for your help

     

     

    Attachments:
    You must be logged in to view attached files.
  • Johan Bijnens

    SSC Guru

    Points: 134302

    • Can you show the result of
      Restore HeaderOnly from url= ... ?

      ?

    • Keep in mind you cannot restore backup files of azure SQLDB or Azure Managed instance db to regular sqlserver instances.

    Johan


    Dont drive faster than your guardian angel can fly ...
    but keeping both feet on the ground wont get you anywhere :w00t:

    - How to post Performance Problems
    - How to post data/code to get the best help[/url]

    - How to prevent a sore throat after hours of presenting ppt ?

    press F1 for solution, press shift+F1 for urgent solution 😀

    Need a bit of Powershell? How about this

    Who am I ? Sometimes this is me[/url] but most of the time this is me

  • Johan Bijnens

    SSC Guru

    Points: 134302

    You could try to download the bak file locally ( with e.g. Microsoft Azure Storage Explorer ) and then perform the restore.

     

    Johan


    Dont drive faster than your guardian angel can fly ...
    but keeping both feet on the ground wont get you anywhere :w00t:

    - How to post Performance Problems
    - How to post data/code to get the best help[/url]

    - How to prevent a sore throat after hours of presenting ppt ?

    press F1 for solution, press shift+F1 for urgent solution 😀

    Need a bit of Powershell? How about this

    Who am I ? Sometimes this is me[/url] but most of the time this is me

  • Jeff Moden

    SSC Guru

    Points: 997150

    Johan Bijnens wrote:

     

      <li style="list-style-type: none;">

    • Can you show the result of
      Restore HeaderOnly from url= ... ?

      ?

     

      <li style="list-style-type: none;">

     

      <li style="list-style-type: none;">

    • Keep in mind you cannot restore backup files of azure SQLDB or Azure Managed instance db to regular sqlserver instances.

     

    Heh... What a finger trap.

    --Jeff Moden


    RBAR is pronounced "ree-bar" and is a "Modenism" for Row-By-Agonizing-Row.
    First step towards the paradigm shift of writing Set Based code:
    ________Stop thinking about what you want to do to a ROW... think, instead, of what you want to do to a COLUMN.
    "Change is inevitable... change for the better is not".
    "Dear Lord... I'm a DBA so please give me patience because, if you give me strength, I'm going to need bail money too!"

    Helpful Links:
    How to post code problems
    How to Post Performance Problems
    Create a Tally Function (fnTally)

  • abdalah.mehdoini

    SSC Eights!

    Points: 890

    I did not understand

  • Johan Bijnens

    SSC Guru

    Points: 134302

    Indeed.

    It is by far THE biggest downside of SQL Paas / Iaas in on Azure!

    on top of that, you cannot extend msdb to keep a relevant amount of job history information.

    and there are some other little buggers that bite whenever you need to enable a feature. e.g dbmail ... mandatory profile name

    Johan


    Dont drive faster than your guardian angel can fly ...
    but keeping both feet on the ground wont get you anywhere :w00t:

    - How to post Performance Problems
    - How to post data/code to get the best help[/url]

    - How to prevent a sore throat after hours of presenting ppt ?

    press F1 for solution, press shift+F1 for urgent solution 😀

    Need a bit of Powershell? How about this

    Who am I ? Sometimes this is me[/url] but most of the time this is me

Viewing 6 posts - 1 through 6 (of 6 total)

You must be logged in to reply to this topic. Login to reply