case 4460
This commit is contained in:
@@ -55,8 +55,8 @@ namespace AyaNova.Biz
|
||||
await JobsBiz.LogJobAsync(Guid.Empty, jobstartmessage);
|
||||
|
||||
DateTime dtStartBackup = DateTime.Now;
|
||||
log.LogDebug("Backup starting");
|
||||
var DemandFileNamePrepend = OnDemand ? "manual-" : string.Empty;
|
||||
log.LogDebug("Backup starting");
|
||||
// var DemandFileNamePrepend = OnDemand ? "manual-" : string.Empty;
|
||||
//*************
|
||||
//DO DATA BACKUP
|
||||
//build command
|
||||
@@ -67,7 +67,8 @@ namespace AyaNova.Biz
|
||||
Npgsql.NpgsqlConnectionStringBuilder PostgresConnectionString = new Npgsql.NpgsqlConnectionStringBuilder(ServerBootConfig.AYANOVA_DB_CONNECTION);
|
||||
var DBNameParameter = $"--dbname=postgresql://{PostgresConnectionString.Username}:{PostgresConnectionString.Password}@{PostgresConnectionString.Host}:{PostgresConnectionString.Port}/{PostgresConnectionString.Database}";
|
||||
|
||||
var DataBackupFile = $"{DemandFileNamePrepend}db-{FileUtil.GetSafeDateFileName()}.backup";//presentation issue so don't use UTC for this one
|
||||
//var DataBackupFile = $"{DemandFileNamePrepend}db-{FileUtil.GetSafeDateFileName()}.backup";//presentation issue so don't use UTC for this one
|
||||
var DataBackupFile = $"db-{FileUtil.GetSafeDateFileName()}.backup";//presentation issue so don't use UTC for this one
|
||||
DataBackupFile = FileUtil.GetFullPathForBackupFile(DataBackupFile);
|
||||
|
||||
var BackupUtilityCommand = "pg_dump";
|
||||
@@ -108,7 +109,7 @@ namespace AyaNova.Biz
|
||||
if (ServerGlobalOpsSettingsCache.Backup.BackupAttachments)
|
||||
{
|
||||
await JobsBiz.LogJobAsync(Guid.Empty, $"LT:Backup LT:Attachments");
|
||||
FileUtil.BackupAttachments(DemandFileNamePrepend);
|
||||
FileUtil.BackupAttachments();
|
||||
log.LogDebug("Backup of file attachments completed OK");
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user