PDA

View Full Version : Database backup api problem


bruce
08-18-2008, 09:06 AM
This is not correct


<add key="BackupLocation" value="D:\Backup\" />


Bruce

DiscountASP.NET
www.DiscountASP.NET (http://www.DiscountASP.NET)

deepaks.123
08-18-2008, 09:57 AM
Hi,

I used the following procedures for database backup with the sample console application

1) Enabled api
2) updated whitlist with my ip address
3) In my application configuration file




<add key="ApiKey" value="-------"/> not the sandbox one



<add key="DatabaseName" value="SQL2005_------" />


<add key="Domain" value="-----" />


<add key="FtpUsername" value="-----" />


<add key="FtpPassword" value="-------" />


<add key="BackupLocation" value="D:\Backup\" />


and in my back up call


CustomerApi api = new CustomerApi();


api.Sql2005CreateBackupCompleted += new DiscountAspSqlBackup.net.discountasp.api.Sql2005Cr eateBackupCompletedEventHandler(BackupCompleted);


PrintLog("Request async backup...");


api.Sql2005CreateBackupAsync(ConfigurationManager. AppSettings["ApiKey"], ConfigurationManager.AppSettings["DatabaseName"]);


and my back up uri is


Uri n = new Uri("ftp://ftp." + ConfigurationManager.AppSettings["Domain"] + "/_database/" + BackUpFile);


But when i run the application it says the file already exists (When i checked the folder in ftp there was no file with that name)


Can any one help me to solve the problem


Deepak

Post Edited (deepak) : 8/18/2008 11:00:13 AM GMT

deepaks.123
08-19-2008, 12:01 AM
but i used <add key="BackupLocation" value="D:\Backup\" /> to specify my local path to where the file should be downloaded


If i used the backup facility of control panel the file goes to _database folder in my ftp and when i run the application it checks for the time stamp of the file and downloads it to the location given that is d:\Backup\ .


The problem is with the backup call i think


I am newbie so if i missed something can you please explain in detail




Post Edited (deepak) : 8/19/2008 1:06:11 AM GMT

deepaks.123
08-21-2008, 11:33 AM
THANX THE PROBLEM IS SOLVED