I have loaded my Rock64 with LibreElec, and I am also using it as my Samba server.
I want to run a sync between the two USB hard drives I have attached to maintain a backup of my media.
I can't seem to get the command quite right. I want to copy the data, and redirect the output to a text file so I can see what it is doing later on.
I do want it to overwrite the old log file.
This is the command I am trying to use:
rsync -rav --modify-window=300 --homan-readable --progress --stats --force --delete /var/media/8TB_WD/ /var/media/8TB_WD2/ |& tee /var/media/8TB_WD2/synclog.txt
-sh: syntax error: unexpected "&"
I have also tried > but I get no log file output at all.
rsync -rav --modify-window=300 --homan-readable --progress --stats --force --delete /var/media/8TB_WD/ /var/media/8TB_WD2/ > /var/media/8TB_WD2/synclog.txt
If I cut off the redirect, it outputs to bash exactly what I would expect, but I can't get it to output to a log file.
Works with output to bash ->
rsync -rav --modify-window=300 --homan-readable --progress --stats --force --delete /var/media/8TB_WD/ /var/media/8TB_WD2/
Can someone make a suggestion. I am probably missing something crazy simple, but just can't see it.
PS for some reason the word hu.man is censored here. Please replace the homan with hu.man when reading my code above.