SQL 2008 Backup

Discussion in 'Control Panel API' started by MarkN, May 21, 2009.

Thread Status:
Threads that have been inactive for 5 years or longer are closed to further replies. Please start a new thread.
  1. Hi

    I've written an application to automatically backup a SQL2008 database using the API, download it and do some other things.

    This has worked in the past but now it throws the following exception:

    System.Web.Services.Protocols.SoapException: Server was unable to process request.
    ---> DiscountASP.net.UnknownException: An unknown error has occurred (1505)

    The file is created in the _database folder on the server and restores ok with what looks like the correct data so what is the error about?

    Is there any way that the limit of 1 backup every 6 hours can be changed, maybe to 4 in 24 hours to allow applications using the API to be debugged more than once first thing in the morning and then last thing in the afternoon.

    Cheers
     
  2. I've written one myself in ASP.NET. Mine gets run automatically each day from the DASP scheduler and it's been happily working since the Sql2008CreateBackup method was introduced on the API - a few months now. I do trap and log exceptions in my application but I'm not seeing any so I don't know what's causing your problem.

    There is a link in this thread to download my code:
    http://community.discountasp.net/showthread.php?t=7780

    You might want to take a look to do a comparison with your stuff.
     
  3. Hi Joe

    There are some differences between my code and yours but mainly the fact that I've written a console application and the API is referenced as a Service Reference rather than a web reference.

    Other than that all it is doing before throwing an exception is:
    • Deleting the old backup if it exists
    • Creating the CustomerAPISoapClient
    • Calling the Sql2008CreateBackup method
    As the backup file appears to be ok and the parameters I'm passing into the API call are correct I think the issue is actually within the Client API although I'm happy to be proved wrong.
     
  4. Hi Mark,

    Yes I guessed your app was running local when you mentioned in your first post that it was downloading the backup when done.

    I'll try and knock something similar up in the next few days to see if I can reproduce your problem or you can publish your existing code if you like. As you've already said, these things are tricky to fault find when there is a limit on calling some of the API methods like this one so it maybe a bit of a slog.

    Something that would help would be if customers could "apply" for a temporary lift of restrictions on the API for short periods on a single account basis e.g. DASP might allow a single account unrestricted API access for say 48hrs after which time it would automatically revert back to normal restrictions..just a thought. It would make situations like these easier to work with.
     
  5. Bruce

    Bruce DiscountASP.NET Staff

    Based on the error, the backup process failed.

    what is your domain? i can take a peek at the log.
     
  6. Bruce

    Bruce DiscountASP.NET Staff

    Joe

    Thanks for suggestion. I'll check w/ the team and see if this can be done or not.
     
Thread Status:
Threads that have been inactive for 5 years or longer are closed to further replies. Please start a new thread.

Share This Page