I would like to run the script remotely. Why isn't this working?
ssh root@192.168.1.162 < ./mikrotik_backup.sh
mikrotik_backup.sh
Code: Select all
:local filename ([/system identity get name] . "-" . [:pick [/system clock get date] 7 11] . [:pick [/system clock get date] 0 3] . [:pick [/system clock get date] 4 6] . "-" . [:pick [/system clock get time] 0 2] . [:pick [/system clock get time] 3 5]);\
/export file=$filename;\
/system backup save dont-encrypt=yes name=($filename);
syntax error (line 1 column 266)
expected command name (line 1 column 1)
expected command name (line 1 column 1)
expected command name (line 1 column 1)
This works e.g.
ssh root@192.168.1.162 /system/identity/print