How to stop python-based borg backup from logging with ^M
Clash Royale CLAN TAG#URR8PPP
up vote
1
down vote
favorite
I'm trying to make a log file for monitoring backup progress using borg deduplicating archiver. While I am logging, the file contains ^M
control characters for each line despite running the script on linux. Is there a means to prevent borg from outputting in this format in the log file?
I tried piping the output (using |&
) to tr -d '^M'
before &>>
to the log file, but in that case, while borg
now displays a running status on the terminal, either nothing actually get's written to the log file in that case.
Alternatively, I've tried `tr -d 'r' in the hopes that it would keep new lines. In that case, the log file becomes just one big single line.
bash io-redirection borgbackup control-characters
add a comment |Â
up vote
1
down vote
favorite
I'm trying to make a log file for monitoring backup progress using borg deduplicating archiver. While I am logging, the file contains ^M
control characters for each line despite running the script on linux. Is there a means to prevent borg from outputting in this format in the log file?
I tried piping the output (using |&
) to tr -d '^M'
before &>>
to the log file, but in that case, while borg
now displays a running status on the terminal, either nothing actually get's written to the log file in that case.
Alternatively, I've tried `tr -d 'r' in the hopes that it would keep new lines. In that case, the log file becomes just one big single line.
bash io-redirection borgbackup control-characters
1
You can trysed -i 's/r/n/g' FILENAME
, if you have the GNU version of sed, which you probably do on Linux. It won't fix the live output, but it'll fix newlines in the old output. If you don't have GNU sed, you can use perl:perl -i -pe 's/r/n/g' FILENAME
.
â dogoncouch
Mar 31 at 18:44
add a comment |Â
up vote
1
down vote
favorite
up vote
1
down vote
favorite
I'm trying to make a log file for monitoring backup progress using borg deduplicating archiver. While I am logging, the file contains ^M
control characters for each line despite running the script on linux. Is there a means to prevent borg from outputting in this format in the log file?
I tried piping the output (using |&
) to tr -d '^M'
before &>>
to the log file, but in that case, while borg
now displays a running status on the terminal, either nothing actually get's written to the log file in that case.
Alternatively, I've tried `tr -d 'r' in the hopes that it would keep new lines. In that case, the log file becomes just one big single line.
bash io-redirection borgbackup control-characters
I'm trying to make a log file for monitoring backup progress using borg deduplicating archiver. While I am logging, the file contains ^M
control characters for each line despite running the script on linux. Is there a means to prevent borg from outputting in this format in the log file?
I tried piping the output (using |&
) to tr -d '^M'
before &>>
to the log file, but in that case, while borg
now displays a running status on the terminal, either nothing actually get's written to the log file in that case.
Alternatively, I've tried `tr -d 'r' in the hopes that it would keep new lines. In that case, the log file becomes just one big single line.
bash io-redirection borgbackup control-characters
edited Mar 31 at 16:01
asked Mar 31 at 15:32
wdkrnls
227314
227314
1
You can trysed -i 's/r/n/g' FILENAME
, if you have the GNU version of sed, which you probably do on Linux. It won't fix the live output, but it'll fix newlines in the old output. If you don't have GNU sed, you can use perl:perl -i -pe 's/r/n/g' FILENAME
.
â dogoncouch
Mar 31 at 18:44
add a comment |Â
1
You can trysed -i 's/r/n/g' FILENAME
, if you have the GNU version of sed, which you probably do on Linux. It won't fix the live output, but it'll fix newlines in the old output. If you don't have GNU sed, you can use perl:perl -i -pe 's/r/n/g' FILENAME
.
â dogoncouch
Mar 31 at 18:44
1
1
You can try
sed -i 's/r/n/g' FILENAME
, if you have the GNU version of sed, which you probably do on Linux. It won't fix the live output, but it'll fix newlines in the old output. If you don't have GNU sed, you can use perl: perl -i -pe 's/r/n/g' FILENAME
.â dogoncouch
Mar 31 at 18:44
You can try
sed -i 's/r/n/g' FILENAME
, if you have the GNU version of sed, which you probably do on Linux. It won't fix the live output, but it'll fix newlines in the old output. If you don't have GNU sed, you can use perl: perl -i -pe 's/r/n/g' FILENAME
.â dogoncouch
Mar 31 at 18:44
add a comment |Â
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f434691%2fhow-to-stop-python-based-borg-backup-from-logging-with-m%23new-answer', 'question_page');
);
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
1
You can try
sed -i 's/r/n/g' FILENAME
, if you have the GNU version of sed, which you probably do on Linux. It won't fix the live output, but it'll fix newlines in the old output. If you don't have GNU sed, you can use perl:perl -i -pe 's/r/n/g' FILENAME
.â dogoncouch
Mar 31 at 18:44