This project is read-only.

Project Description
This project provides a free client class library on any platform supporting the .Net Framework 4.0 to backup Microsoft SQL 2000/2005/2008 & 2008 R2 databases and script tables, stored procedures, views, and user defined functions using SQL Server Management Objects (SMO). The application supports 7-zip compression of the database to backup files with Aes256 encryption. The application also supports using FTP, FTPS and SFTP to send the database files to multiple remote servers. Also added support for sending SMTP emails after backup is complete.

Backup, FTP & Email Example

Script Database Object Example

Script Table Data Example

SQL Logging Example

SQLBackupFTP version 1.0

Copyright (C) Matthew David Elgert 2012 -


SQLBackupFTP is a MSSQL backup and FTP program.


Microsoft .Net Framework 4.0


  • Microsoft SQL Server 2000/2005/2008R2 Database Backup
  • Script Database objects for DB version control
  • Schedule Backup jobs
  • Send backups to FTP, SFTP, FTPS, local or network folder
  • Send e-mail log files
  • AES 256 encryption 7-Zip files


1. Modify SQLBackupFTP.exe.Config file

Sample SQLBackupFTP.exe.Config

<?xml version="1.0"?>
    <add name="ApplicationServices" connectionString="data source=localhost;UID=sa;PWD=Password;initial catalog=Master" providerName="System.Data.SqlClient" />
      <smtp deliveryMethod="Network" from="">
        <network host="" port="587" userName="" password="yourpassword" enableSsl="true" />
    <add key="TimeStamp" value="20120221101302" />
    <add key="SQLCommandTimeout" value="999999999" />
    <add key="LogDB" value="SQLBackupFTP" />
    <!--Gmail server has a bug that does not allow send to address from the same address in this case send through an open mail relay-->
    <add key="SMTPRelayPort" value="25" />
    <add key="SMTPRelayEnableSsl" value="false" />
    <add key="SMTPRelayHost" value="" />
    <add key="SendEmailTo" value=""/>
    <add key="SendEmailFrom" value=""/>
    <add key="SendEmailSubject" value="SQLBackupFTPLog home database"/>
    <!--Add password to file if blank no password-->
    <add key="ArchivePwd" value="Nf3PF9mTh$VGNZ8TW%^S%3HTWf$^S2zz#rPMxYs5" />
    <!--Default Application root\SQLBackupFTPTemp\-->
    <!--<add key="TempDir" value="D:\SQLBackupFTPTemp\" />-->
    <!--Default Log.txt-->
    <add key="LogFile" value="Log.txt"/>
    <!--Default 120000 //ms-->
    <add key="FTPTimeOut" value="120000"/>
    <!--Default false-->
    <add key="BackupAll" value="False"/>
    <add key="ConsoleExit" value="False"/>
    <!--Deletes the entire temp folder with 7 zip files and logs-->
    <add key="DelTemp" value="False"/>
    <!--Deletes just the temp files to create the 7 zip files keep the logs-->
    <add key="DelBakTemp" value="False" />
    <add key="ScriptDB" value="True" />
    <add key="ScriptTableData" value="True" />
    <add key="BackupDBOff" value="False"/>
    <add key="FTPOff" value="False"/>
    <add key="SevenZipOff" value="False"/>
    <add key="SendMailOff" value="False"/>

2. Modify and add ftp servers to FTPServers.xml file

Sample FTPServers.xml

<?xml version="1.0" encoding="utf-8" ?>

3. Modify and add databases to Databases.xml file

Sample Databases.xml

<?xml version="1.0" encoding="utf-8" ?>


SevenZipSharp SevenZip.dll 7z.dll

Alex FTPS Client

Tamir.SharpSSH.dll DiffieHellman.dll Org.Mentalis.Security.dll

Task Scheduler Managed Wrapper

Microsoft SQL Server 2008 R2 Express Microsoft.SqlServer.ConnectionInfo.dll, Microsoft.SqlServer.Management.Sdk.Sfc.dll, Microsoft.SqlServer.Smo.dll


2/23/2012 Version 1.1
* Added Task Scheduler

2/21/2012 Version 1.0
* First release

Last edited Feb 23, 2012 at 7:59 AM by mdelgert, version 20