Problem : the shell is seeing separate commands like "nohup while true" & "do ./mysync.sh" & "sleep 1800" & "done &".
Here, the shell sees a problem with unexpected "do".
Solution : you would have to group your commands into one unit, either with quoting or by making a small shell script. Give this unit to nohup and it will work.
(Solution A) Join the commands like this:
nohup bash -c "while true; do ./mysync.sh; sleep 1800; done &"
(Solution B) Put the commands while true; do ./mysync.sh; sleep 1800; done &
into mywrapper.sh
and run this:
nohup mywrapper.sh