I’m trying to run the following command
rsync -avz /mnt/backups/`date \
--date=yesterday +\%Y-\%m-\%d`-`date \
--date=yesterday +\%A`/server1/ /mnt/backups/`date \
+\%Y-\%m-\%d`-`date +\%A`/server1/
The problem is I don't know how to change this from Ubuntu syntax to solaris which I have been asked to write a rsync script for. It doesn't like the date --date=yesterday +\%Y-\%m-\%d
-date --date=yesterday +\%A
part. How would I write this part of the code so solaris understand it, I have had a read of the man page but couldn't get it to work