dmkjr
(Dmkjr)
1
Is it possible to write out a log file with custom parameters where it writes to a new file based on the date? Something like....
backup_job_name-"date +"%d-%m-%Y"
".log
It appears the script doesn't run if that log-file isn't found, so I'm trying to dynamically create the file(s) before it runs.
What's the easiest way to acomplish?
asdffdsa
(jojothehumanmonkey)
2
try
rclone lsd . --log-level=DEBUG --log-file=/home/user01/rclone/log/`date +%Y%m%d.%I%M%S`.log
dmkjr
(Dmkjr)
3
This is the response from rclone.
2021/11/20 12:44:46 Failed to open log file: open /home/dmkjr/backup/log/20211120.124446.log: no such file or directory
Does the directory exist?
dmkjr
(Dmkjr)
5
That's what it was. Thanks. Wasn't sure if it could create the file, but didn't think about the directory.
system
(system)
Closed
6
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.