**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?
Asked by Time-Bandit
(218 rep)
Aug 7, 2022, 10:49 AM