string dbname = _dbContext.Database.Connection.Database;
const string sqlCommand = @"BACKUP DATABASE [{0}] TO DISK = N'{1}' WITH NOFORMAT,
NOINIT, NAME = N'MajesticDb-Ali-Full Database Backup',
SKIP, NOREWIND, NOUNLOAD, STATS = 10";
int path = _dbContext.Database.ExecuteSqlCommand(System.Data.Entity.TransactionalBehavior
.DoNotEnsureTransaction,
string.Format(sqlCommand, dbname, "MajesticDB"));
I am using this code to make a database backup. It's working fine but this code is replacing the previous file with the new one. How do I change it so it doesn't?