Rsync Email As Backup Issue
I've used this cmd before to rsync all mailboxes using a cron job, but after setting up a new server I can't seem to get it to work. Here is the command:
fox x in $(cat /userlist.txt); do rsync -vrlptgDuo --delete /home/$x/mail/ [IP]::[Share]/home/mail/$x/mail/ ;done
It works fine on every other CentOS 6 machine I have used it on, but this is what I am getting on this one and I can't find any useful info on Google:
-bash: syntax error near unexpected token `do'
I use it as a every 5 minute cron job so I have a backup of all mail up to 5 minutes back.
-
fox x in $(cat /userlist.txt); do rsync -vrlptgDuo --delete /home/$x/mail/ [IP]::[Share]/home/mail/$x/mail/ ;done
Hello :) You have "fox x" instead of "for x" in this bash command. Thank you.0 -
Hahaha, Man do I feel stupid right now. You have no idea how many times I read through that over and over and didn't notice. Thanks. 0 -
Not a problem! A third-party perspective is often useful for those types of oversights. Thank you. 0
Please sign in to leave a comment.
Comments
3 comments