none
Database restore report success, but database is not restored. RRS feed

  • Question

  • Hi,

    I have an Azure Linux Web App service (running a flask app connected to an Azure postgreSQL db.

    I am working via the portal, and I have configured the connection string for the web app and scheduled regular backups which include the database (under the Database section, "Include in backup" is checked.)

    I make changes to the database (via the webapp), stop the app and then attempt a restore to a backup from before the changes. 

    It warns me that the web app AND database will be completely overwritten. If only :(.

    After the restore reports success and restore has completed (it also automatically starts the web app). Once started, I go in but the database is not restored. The changes I made before the restore are still there.

    I have repeated the test in multiple scenarios and still no success. Could anyone advise what I could be doing wrong or if this is a known issue?

    Thanks!

    Friday, May 3, 2019 8:10 AM

All replies

  • Hi Mark,

    Do you have a high level of confidence the backup you are attempting to restore from is a copy made before the changes, or has the backup service already rolled through and overwritten the incremental copies? I am trying to understand if the copy you are restoring from is sourced from a storage account separate from where the App Service is writing backup files to. 

    Do you have a timestamp or other indication that is part of your test? If you can post a screen capture to this thread, that would be helpful.

    Thank you,

    Mike 

    Friday, May 3, 2019 8:11 PM
    Moderator
  • Hi Mike, thanks for your help.

    I have a high level of confidence! I make a db change specifically for the test and then view the change in the webapp (it is flask app displaying the data from the postgresql db), I then shutdown the app. I run the restore to a backup which is only scheduled to run in the morning (so the most recent backup is a few hours old - I check the restore point time as well.) 

    The web app itself is restored (any flask app changes I have made are lost), but the database remains unchanged. I have checked that all connections are as expected and that I am viewing the correct database - i.e. changing the database by other means. The flask app does not use the web app "connection string" that the azure backup uses, but I have checked that this is also for the correct database and that the string is correct. ( The backup reports success! The restore reports success as well -  even though it is only the web app that is restored but not the database

    This is the screen shot of my restore:

    (sorry tried to attach a screenshot, but only AFTER preparing the image it tells me I cannot attach because I am not verified and I don't have access to my email at the moment.)

    Thanks for any help!


    • Edited by mark_bem Sunday, May 5, 2019 1:55 PM
    Sunday, May 5, 2019 8:33 AM
  • Do you have an Azure Support Plan? If you do, please reach out to support. If you do not have an Azure support plan please send your Subscription ID to AzCommunity and instructions will be returned to you on next steps.

    In case you haven't seen the following documentation but, if you are following this and finding you are not getting the backup to restore as well, there could be a bug.

    Backup and App

    Restore an app in Azure 

    I hope this helps!

    Monday, May 6, 2019 11:19 PM
    Moderator
  • Hi, thanks!

    Yes I have read those articles and I cannot think of what I am missing. We are on the S1 service plan, SSL is not enabled and the back size is less than 10GB (only 250MB actually). In any case, the backups and restore all report success, but still the the database contents always remains the same!

    Yes we are paying for a subscription and a support plan. Happy to pay more! It's minor compare to the costs of the delays and lost time trying to fix this! I raised a Support request 5 days ago on Friday morning at 8am, bumped it yesterday morning, raised it to severity level A, still no response!!!? Please help, the support request ID is: 119050326000519.

    We're looking into switching to AWS....

    Tuesday, May 7, 2019 8:35 AM
  • Hi Mark,

    I have started a discussion internally with the App Services team but did want to visit the part where the SSL is not enabled. Can you try enabling this or is SSL supposed to be disabled? When you took the initial backup, was SSL enabled? How was the initial backup accomplished?

    Thank you for any additional detail.

    Tuesday, May 7, 2019 7:18 PM
    Moderator
  • Hi, thank you,

    The SSL has always been disabled. In the PostgreSQL Server Overview pane, there is "SSL enforce status:DISABLED"

    The connection string in the web service configuration is of the format:

    HOST=######.postgres.database.azure.com; DB=stage; UID=####@####; PWD=####;

    Thanks for following up. I have since upgraded from the developer to standard support plan for 100$ and this is supposed to ensure 1h response time to requests (which is it also says in the confirmation email).

    I have raised a duplicate support request just in case, the ID's are 119050722001527 and 119050326000519. Nothing in 10h so far! Is there anything you can do to speed this along?  There is supposed to be a technical support number as well, but when I phone it, it says it is closed for a public holiday - the only team I can get through to is sales and they are also confused about what is going on...

    Tuesday, May 7, 2019 9:46 PM
  • Thank you for the additional detail. I have reached out to the PostgreSQL PG directly.
    Wednesday, May 8, 2019 4:44 PM
    Moderator
  • Thanks Mike,

    Someone did get hold of me at last. They were unable to resolve the problem and referred to the web app services because the problem is due to web app restore linked to a postgresql data. This has taken too much time though and we are now just using the postgres restore in isolation.

    Thursday, May 9, 2019 8:55 AM
  • Several of the SRs were closed except one. I am following up with this. 
    Friday, May 10, 2019 4:05 PM
    Moderator
  • The open SR for this issue is the following: 119050722003200

    Can you confirm the role you are currently set as for your subscription when you log in to the Portal?

    Friday, May 10, 2019 4:19 PM
    Moderator
  • Next Steps: Please update the support ticket that is currently open to log a bug for this issue. I have communicated internally with the support team and unless there is a configuration step or detail that is preventing success with this functionality, it is a bug. 

    Thanks,

    Mike

    Friday, May 10, 2019 7:11 PM
    Moderator
  • Hi Mike,

    Thank you for looking into this and following up. I have checked everything I possibly can and cannot figure out why it didn't work. Using the Postrgresql Backups in isoloation is a good enough workaround so we really can't spend much more time on this.  Happy to have a quick chat or demo the issue - my contact details are on the SR 119050722003200. One call/demo though! I can't spend time getting bounced around anymore. If it is a bug on your system then we would like something in return to make up for the time we have wasted on this.

    Best

    Mark

    Monday, May 13, 2019 9:29 AM
  • There appears to be a bug with the App Service backup/restore (when database is included) in that the backup appears to be successfully backed up but that copy does not seem to be restored correctly. The solution is to manually restore the backup that was created by the App Service.

    I am investigating if there is a bug open for this with the App Service team, as the support cases were closed without a resolution.

    Wednesday, May 22, 2019 6:44 PM
    Moderator