case 4684 - server log records the next automatic backup at startup
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -19,6 +19,7 @@ IN PROGRESS
|
|||||||
- Server: in some cases the automatic backup could be skipped for one day after the AyaNova server was restarted or a manual backup was made; it now always runs at the next chosen [backup time](ops-form-backup.md#backup-time).
|
- Server: in some cases the automatic backup could be skipped for one day after the AyaNova server was restarted or a manual backup was made; it now always runs at the next chosen [backup time](ops-form-backup.md#backup-time).
|
||||||
- Server: in some cases opening a record that has since been deleted (for example from an old link) gave a server error, and a report printed for records of which some had since been deleted failed; it now shows a "not found" message, and the report prints the remaining records.
|
- Server: in some cases opening a record that has since been deleted (for example from an old link) gave a server error, and a report printed for records of which some had since been deleted failed; it now shows a "not found" message, and the report prints the remaining records.
|
||||||
- Server: in some cases deleting a record that is still in use elsewhere (for example a customer, unit, part or rate used on a work order, quote or PM) gave a server error; it now always says which kind of record is using it.
|
- Server: in some cases deleting a record that is still in use elsewhere (for example a customer, unit, part or rate used on a work order, quote or PM) gave a server error; it now always says which kind of record is using it.
|
||||||
|
- Server: the server log now records the next automatic backup time (or that automatic backup is off) each time the server starts.
|
||||||
|
|
||||||
### AyaNova 8.3.0
|
### AyaNova 8.3.0
|
||||||
|
|
||||||
|
|||||||
@@ -674,6 +674,9 @@ namespace AyaNova
|
|||||||
//Log the license info so it's on the record
|
//Log the license info so it's on the record
|
||||||
_newLog.LogInformation($"License - [{AyaNova.Core.License.LicenseInfoLogFormat}]");
|
_newLog.LogInformation($"License - [{AyaNova.Core.License.LicenseInfoLogFormat}]");
|
||||||
|
|
||||||
|
//case 4684: so the log of a restarted server shows whether, and when, the next backup will run
|
||||||
|
_newLog.LogInformation(ServerGlobalOpsSettingsCache.BackupStatusText());
|
||||||
|
|
||||||
|
|
||||||
//Check for SuperUser password override
|
//Check for SuperUser password override
|
||||||
if (!string.IsNullOrWhiteSpace(ServerBootConfig.AYANOVA_SET_SUPERUSER_PW))
|
if (!string.IsNullOrWhiteSpace(ServerBootConfig.AYANOVA_SET_SUPERUSER_PW))
|
||||||
|
|||||||
@@ -89,5 +89,17 @@ namespace AyaNova.Util
|
|||||||
return TimeZoneInfo.ConvertTimeToUtc(local, TimeZoneInfo.Local);
|
return TimeZoneInfo.ConvertTimeToUtc(local, TimeZoneInfo.Local);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//case 4684: the backup schedule as written to the server log, on the server's clock as the backup time is set
|
||||||
|
internal static string BackupStatusText()
|
||||||
|
{
|
||||||
|
if (!Backup.Active)
|
||||||
|
return "Automatic backup - inactive";
|
||||||
|
var utc = DateTime.SpecifyKind(NextBackup, DateTimeKind.Utc);
|
||||||
|
var local = TimeZoneInfo.ConvertTimeFromUtc(utc, TimeZoneInfo.Local);
|
||||||
|
//from the UTC moment, so the night the clocks go back shows the offset of the hour actually meant
|
||||||
|
var offset = TimeZoneInfo.Local.GetUtcOffset(utc);
|
||||||
|
return $"Automatic backup - next at {local:yyyy-MM-dd HH:mm} (UTC{(offset < TimeSpan.Zero ? "-" : "+")}{offset:hh\\:mm})";
|
||||||
|
}
|
||||||
|
|
||||||
}//eoc
|
}//eoc
|
||||||
}//eons
|
}//eons
|
||||||
Reference in New Issue
Block a user