I am trying to have the output of kopia repo sync-to S3 sent to me via mail, but the output is inherently hostile against e-mail, since it contains lots of control characters, which mail(x) has trouble getting into the body. So it just creates an application/octet-stream attachment.
Anyone having a solution for that? I tried some sed/tr but I cannot get finally rid of these pesky ^M which mark linebreaks.
I did, but that didn’t help. I captured Kopia’s output using &> sync.txt:
[root@kopia repos]# cat sync.txt -vet
Synchronizing repositories:^[[0m$
Source: Filesystem: /mnt/kopia/ST7A^[[0m$
Destination: S3: s3.eu-central-1.wasabisys.com kopiast7a^[[0m$
^[[32mNOTE: By default no BLOBs are deleted, pass --delete to allow it.^[[0m$
Looking for BLOBs to synchronize...^[[0m$
^M Found 1 BLOBs in the destination repository (2.4 KB)^M Found 2001 BLOBs in the destination repository (45 GB) ^M Found 5001 BLOBs in the destination repository (114.4 GB)^M Found 7001 BLOBs in the destination repository (160.6 GB)^M Found 8001 BLOBs in the destination repository (183.6 GB)^M Found 10001 BLOBs in the destination repository (229.8 GB)^M Found 12001 BLOBs in the destination repository (276.1 GB)^M Found 15001 BLOBs in the destination repository (345.4 GB)^M Found 18001 BLOBs in the destination repository (415 GB) ^M Found 20001 BLOBs in the destination repository (461 GB) ^M Found 22001 BLOBs in the destination repository (507.2 GB)^M Found 24001 BLOBs in the destination repository (553.6 GB)^M Found 25164 BLOBs in the destination repository (579.9 GB)$
^M Found 1 BLOBs (2.4 KB) in the source repository, 0 (0 B) to copy^M Found 9586 BLOBs (221.3 GB) in the source repository, 0 (0 B) to copy^M Found 20266 BLOBs (468.8 GB) in the source repository, 0 (0 B) to copy^M Found 25060 BLOBs (579.4 GB) in the source repository, 0 (0 B) to copy$
Found 0 BLOBs to delete (0 B), 25060 in sync (579.4 GB)^[[0m$
It has been solved for me back then - no issues with that anymore! I guess the comment was not about the solution, but as of why kopia is throwing a Crtrl-M in there in the first place.