0

Situation:
I get daily backups of my vps onto an external hard disk and I create daily "snapshots" using rsyncd into folders named via the date function.

Then I use 7z immediately following the rsync snapshot to create a multi-part archive that I can upload for long-term storage.

Progress
I can do all of the above using the 7z command below:

cd /path/to/external/hd/daily-snapshots/$(date --date="yesterday" +%Y-%m-%d) && cputool --load-limit 5.5 -- 7z a -t7z -m0=lzma2 -mx=9 -aoa -mfb=64 -md=32m -ms=on -mhe -pXXXXX full-$(date --date="yesterday" +%Y-%m-%d).7z * -v5g

Problem:
How can I write the contents of the archive to a log file?

cd /path/to/external/hd/daily-snapshots/daily-snapshots/$(date --date="yesterday" +%Y-%m-%d) && cputool --load-limit 5.5 -- 7z a -t7z -m0=lzma2 -mx=9 -aoa -mfb=64 -md=32m -ms=on -mhe -pXXXXX full-$(date --date="yesterday" +%Y-%m-%d).7z * -v5g >> /var/log/7z-daily-archive.log

doesn't seem to work...

Any thoughts?

Time-Bandit
  • 202
  • 2
  • 10
  • `2>&1 >> /var/log/7z-daily-archive.log` ? Or just add `-bs0` to 7z arguments. – Artem S. Tashkinov Aug 07 '22 at 13:36
  • @ArtemS.Tashkinov can you post an example of `-bs0`? it is not in the man page https://linux.die.net/man/1/7z#:~:text=7%2DZip%20is%20a%20file,uses%20plugins%20to%20handle%20archives. – Time-Bandit Aug 07 '22 at 23:10

0 Answers0