question

Pratikc5 avatar image
Pratikc5 asked

How to take backup of sql server db and push it to remote ftp site

Hello everyone, I want to know is this possible to take backup of sql server database directly on remote ftp site through sql server management plan??? if yes than can somebody provide me script/guidance regarding this or else I need to do it through program.
sql-serverbackupftp
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

salum avatar image
salum answered
1 comment
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Thanx for your link but I am not looking for any third party software to do this, I know about SQLBackupAndFTP and some other commercially available software.
0 Likes 0 ·
salum avatar image
salum answered
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Pratikc5 avatar image
Pratikc5 answered
following script is very usefull for my requirement...Although its not so efficient but still, does my work. BACKUP DATABASE [testdb] TO DISK = N'D:\Backup\testdb.bak' WITH INIT , NOUNLOAD , NAME = N'testdb backup', NOSKIP , STATS = 10, NOFORMAT EXEC master.dbo.xp_cmdshell 'ECHO open localhost> D:\Backup\ FTP.TXT' EXEC master.dbo.xp_cmdshell 'ECHO share>> D:\Backup\ FTP.TXT' EXEC master.dbo.xp_cmdshell 'ECHO share@123>> D:\Backup\ FTP.TXT' EXEC master.dbo.xp_cmdshell 'ECHO put D:\Backup\testdb.bak>> D:\Backup\ FTP.TXT' EXEC master.dbo.xp_cmdshell 'ECHO quit>> D:\Backup\ FTP.TXT' EXEC master.dbo.xp_cmdshell 'ftp -s:D:\Backup\ FTP.TXT'
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

markr avatar image
markr answered
Try SQL Backup Master. Can publish SQL Server database backups not only to FTP, but SFTP/FTPS, Dropbox, Amazon S3, and more. http://www.sqlbackupmaster.com/
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Pavel Pawlowski avatar image
Pavel Pawlowski answered
If you do not want use any third party software, then you can create a SSIS package to handle this task. You can use the Backup Database Task or SQL Script Task to invoke the BACUP DATABASE. Then simply connect this task using precedence constraint to a FTP Task, which will take care about transfer to remote FTP site. This is much more secure than allowing xp_cmdschell and you do not need any third party components or tools.
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Olek avatar image
Olek answered
I'm using SQLBackupAndFTP [ http://sqlbackupandftp.com/][1] for such purpose. [1]: http://sqlbackupandftp.com/
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.