Hi folks,
I've noticed something strange in my Linux Mint 20, FFS 11.9 log files - details below. The batch file timestamp (first line in log) shows the date in mm/dd/yy format for most jobs, but in dd/mm/yy format for others (monthly and weekly - and I can't tell for yearly). By contrast, the log file details (final line in log) shows the date in yyyy-mm-dd format. It doesn't cause me any problems but I can't see how I could have it set it this way.
Regards,
John
archive_primary 05/06/21 11:26:10
/home/john/live_files/backups/FreeFileSync/logs/archive_primary 2021-05-06 112610.933.html
archive_secondary 05/06/21 11:26:23
/home/john/live_files/backups/FreeFileSync/logs/archive_secondary 2021-05-06 112623.379.html
daily_primary 05/06/21 11:26:42
/home/john/live_files/backups/FreeFileSync/logs/daily_primary 2021-05-06 112642.281.html
daily_secondary 05/06/21 11:27:42
/home/john/live_files/backups/FreeFileSync/logs/daily_secondary 2021-05-06 112742.998.html
monthly_primary 01/05/21 22:36:38
/home/john/live_files/backups/FreeFileSync/logs/monthly_primary 2021-05-01 223638.102.html
monthly_secondary 01/05/21 22:38:01
/home/john/live_files/backups/FreeFileSync/logs/monthly_secondary 2021-05-01 223801.891.html
music_primary 05/06/21 11:26:32
/home/john/live_files/backups/FreeFileSync/logs/music_primary 2021-05-06 112632.291.html
music_secondary 05/06/21 11:26:36
/home/john/live_files/backups/FreeFileSync/logs/music_secondary 2021-05-06 112636.682.html
weekly_primary 03/05/21 22:36:41
/home/john/live_files/backups/FreeFileSync/logs/weekly_primary 2021-05-03 223641.911.html
weekly_secondary 03/05/21 22:38:03
/home/john/live_files/backups/FreeFileSync/logs/weekly_secondary 2021-05-03 223803.301.html
yearly_primary 01/01/21 22:32:17
/home/john/live_files/backups/FreeFileSync/logs/yearly_primary 2021-01-01 223217.781.html
yearly_secondary 01/01/21 22:32:36
/home/john/live_files/backups/FreeFileSync/logs/yearly_secondary 2021-01-01 223236.966.html
log file date format
- Posts: 17
- Joined: 4 Jun 2019
- Site Admin
- Posts: 7211
- Joined: 9 Dec 2007
Most likely an older FFS version not respecting user locale settings. The behavior of the latest FFS 11.9 should be the correct one, though.
- Posts: 17
- Joined: 4 Jun 2019
I'm running FFS 11.9
- Attachments
-
- FFS version.odt
- (37.78 KiB) Downloaded 194 times
- Posts: 17
- Joined: 4 Jun 2019
Curiouser and curiouser. I deleted and recreated the archive_primary batch job and left all the other batch jobs untouched. I then executed my FFS script which ran the archive, music and daily _primary and _secondary batch jobs. They ALL now show the date in dd/mm/yy format, not just the re-created archive_primary job. Ho hum.
archive_primary 06/05/21 23:31:39
/home/john/live_files/backups/FreeFileSync/logs/archive_primary 2021-05-06 233139.418.html
archive_secondary 06/05/21 23:31:50
/home/john/live_files/backups/FreeFileSync/logs/archive_secondary 2021-05-06 233150.476.html
daily_primary 06/05/21 23:32:07
/home/john/live_files/backups/FreeFileSync/logs/daily_primary 2021-05-06 233207.731.html
daily_secondary 06/05/21 23:32:19
/home/john/live_files/backups/FreeFileSync/logs/daily_secondary 2021-05-06 233219.298.html
music_primary 06/05/21 23:31:59
/home/john/live_files/backups/FreeFileSync/logs/music_primary 2021-05-06 233159.216.html
music_secondary 06/05/21 23:32:02
/home/john/live_files/backups/FreeFileSync/logs/music_secondary 2021-05-06 233202.117.html
archive_primary 06/05/21 23:31:39
/home/john/live_files/backups/FreeFileSync/logs/archive_primary 2021-05-06 233139.418.html
archive_secondary 06/05/21 23:31:50
/home/john/live_files/backups/FreeFileSync/logs/archive_secondary 2021-05-06 233150.476.html
daily_primary 06/05/21 23:32:07
/home/john/live_files/backups/FreeFileSync/logs/daily_primary 2021-05-06 233207.731.html
daily_secondary 06/05/21 23:32:19
/home/john/live_files/backups/FreeFileSync/logs/daily_secondary 2021-05-06 233219.298.html
music_primary 06/05/21 23:31:59
/home/john/live_files/backups/FreeFileSync/logs/music_primary 2021-05-06 233159.216.html
music_secondary 06/05/21 23:32:02
/home/john/live_files/backups/FreeFileSync/logs/music_secondary 2021-05-06 233202.117.html
- Site Admin
- Posts: 7211
- Joined: 9 Dec 2007
Where are these timestamps shown? Somewhere in FreeFileSync?
- Posts: 17
- Joined: 4 Jun 2019
The batch file timestamp is first line in the log. The log file details is the last line in log.
For some unknown reason the batch file timestamp format has switched back to mm/dd/yy for the archive, daily and music _primary and _secondary backups run earlier today.
Sample log file attached.
For some unknown reason the batch file timestamp format has switched back to mm/dd/yy for the archive, daily and music _primary and _secondary backups run earlier today.
Sample log file attached.
- Attachments
-
- daily_secondary 2021-05-07 113752.885.html
- (3.15 KiB) Downloaded 188 times
- Posts: 17
- Joined: 4 Jun 2019
I've just re-run the archive, daily and music _primary and _secondary backups and now they're all showing the date in dd/mm/yy format again.
Sample log file attached.
Sample log file attached.
- Attachments
-
- archive_primary 2021-05-07 125513.096.html
- (3.32 KiB) Downloaded 171 times
- Posts: 17
- Joined: 4 Jun 2019
I've worked out what's happening.
FFS is run by a script.
When invoked manually or by cron it is run by user 'john' and locale -k LC_TIME shows d_fmt="%d/%m/%y".
When invoked by anacron it is run by user 'root' and locale -k LC_TIME shows d_fmt="%d/%m/%y".
To avoid permissions problems with files when running as root, the script spawns a job to run itself as user 'john' (runuser -c run_FFS --login john) and exits.
However, for the spawned job running as 'john', locale -k LC_TIME shows d_fmt="%m/%d/%y".
Isn't Linux wonderful?
FFS is run by a script.
When invoked manually or by cron it is run by user 'john' and locale -k LC_TIME shows d_fmt="%d/%m/%y".
When invoked by anacron it is run by user 'root' and locale -k LC_TIME shows d_fmt="%d/%m/%y".
To avoid permissions problems with files when running as root, the script spawns a job to run itself as user 'john' (runuser -c run_FFS --login john) and exits.
However, for the spawned job running as 'john', locale -k LC_TIME shows d_fmt="%m/%d/%y".
Isn't Linux wonderful?
- Posts: 17
- Joined: 4 Jun 2019
When the script is invoked manually, or by anacron or cron, the locale is set to en_GB.UTF-8 (the UK default), irrespective of the user invoking it.
When it is invoked by 'runuser' the locale LC_TIME is set to POSIX, with d_fmt then set to "%m/%d/%y", despite it running as the same user that normally invokes it by cron or manually.
So, when invoked by 'runuser', executing export LANG="en_GB.UTF-8" before calling FreeFileSync solves the problem.
When it is invoked by 'runuser' the locale LC_TIME is set to POSIX, with d_fmt then set to "%m/%d/%y", despite it running as the same user that normally invokes it by cron or manually.
So, when invoked by 'runuser', executing export LANG="en_GB.UTF-8" before calling FreeFileSync solves the problem.