This project is read-only.
1

Closed

Feature Request: Automatically create the backup destination directory if it does not exist.

description

Hi.
 
Thank you for Sql Server Database Backup Utility v1.0.0.0.
 
I would like to request that the backup destination directory is automatically created if it does not exist.
 
Currently, I get the following exception:
 
SqlDatabaseBackup process started
HOSTNAME\SqlExpress 9.0.5000
Starting the backup process...
Backing up database master to C:\work\Sql Backups\master_20110805 114734.bak...Error backing up database, Backup failed for Server 'HOSTNAME\SqlExpress'.
 
Backing up database model to C:\work\Sql Backups\model_20110805 114735.bak...Error backing up database, Backup failed for Server 'HOSTNAME\SqlExpress'.
Backup process completed successfully
 
Starting the archive process...
Error archiving files, Could not find a part of the path 'C:\work\Sql Backups\SqlBackup_20110805_114735.zip'.
 
Unhandled Exception: System.IO.DirectoryNotFoundException: Could not find a part of the path 'C:\work\Sql Backups\SqlBackup_20110805_114735.zip'.
at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy)
at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options, String msgPath, Boolean bFromProxy)
at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options)
at ICSharpCode.SharpZipLib.Zip.ZipFile.Create(String fileName)
at SqlDatabaseBackup.ArchiveManager.ArchiveFiles(String archivePath, ArrayList filesToArchive) in D:\work\SqlBackup\SqlDatabaseBackup\ArchiveManager.cs:line 25
at SqlDatabaseBackup.Program.ArchiveFiles() in D:\work\SqlBackup\SqlDatabaseBackup\Program.cs:line 248
at SqlDatabaseBackup.Program.Main(String[] args) in D:\work\SqlBackup\SqlDatabaseBackup\Program.cs:line 55
 
Thank you.
Closed Mar 7, 2012 at 3:03 AM by obastemur
Implemented

comments