Is anybody else having problems with UTF / non-ASCI characters not displaying correctly in duplicacy logs?
I’m suspecting that this is not duplicacy’s fault but has to do with how I process its output in powershell, but I’m not sure.
Here is the script that I use to run the backups and produce the log file:
$backupID = "ALPHA_C"
$repositorypath = "C:\"
$backupoptions = "-log backup -vss -vss-timeout 120 -stats -threads 6"
# Construct logfile name for the day
$logfiledate = get-date -format yyyy-MM-dd
$tmplogfilename = "tmp_$backupID.log"
$prunelogfilename = "tmp_prune_$backupID-$logfiledate.log"
$logfilename = "backup_$backupID-$logfiledate.log"
$logfilepath = "c:\duplicacy\logs\" + $logfilename
# Go to repository
Set-Location -Path $repositorypath >> "C:\duplicacy\logs\$logfilename"
$(get-date -Format "yyyy-MM-dd HH:mm:ss") + " *** Starting new backup of " + $(convert-path $(get-location).Path) + " ***" >> "C:\duplicacy\logs\$logfilename"
# Start backup
Start-Process -FilePath "c:\duplicacy\duplicacy.exe" -ArgumentList "$backupoptions" -RedirectStandardOutput "C:\duplicacy\logs\$tmplogfilename" -wait -NoNewWindow
Get-Content ( JOIN-PATH "C:\duplicacy\logs\" $tmplogfilename ) | Out-File -filePath $logfilepath -Append
$(get-date -Format "yyyy-MM-dd HH:mm:ss") + " *** Backup of " + $(convert-path $(get-location).Path) + " stopped ***" >> "C:\duplicacy\logs\$logfilename"