Derek Humes
Dabbler
- Joined
- Feb 22, 2016
- Messages
- 44
Hello, I have recently used another thread I found to setup an automatic copy of my FreeNAS configuration to one of my datasets so that in the event of a boot device failure, I have a copy of the configuration.
This is the command that I have used to test this. This command works if I issue it manually in the shell as root:
cp /data/freenas-v1.db "/mnt/volume/dataset/`date \+%Y\%m\%d`_`cat /etc/version | cut -d'-' -f2`_`cat /etc/version | cut -d'-' -f4`.db"
This creates a copy of the freenas-v1.db file with the date and version in the filename.
I have setup a Cron job on my FreeNAS GUI to run this command nightly at 10PM EST. However, each night I am receiving the below error message in email, and a copy of the configuration is NOT created.
Syntax error: EOF in backquote substitution
Syntax error: Error in command substitution
I have tried some online syntax checker tools for my command to determine why these errors are occurring, but I have not had any luck. My experience with Unix command line shell is very minimal, but slowly growing.
My machine build is FreeNAS-9.10.2-U1 (86c7ef5).
Any assistance with this would be greatly appreciated. Thank you!
This is the command that I have used to test this. This command works if I issue it manually in the shell as root:
cp /data/freenas-v1.db "/mnt/volume/dataset/`date \+%Y\%m\%d`_`cat /etc/version | cut -d'-' -f2`_`cat /etc/version | cut -d'-' -f4`.db"
This creates a copy of the freenas-v1.db file with the date and version in the filename.
I have setup a Cron job on my FreeNAS GUI to run this command nightly at 10PM EST. However, each night I am receiving the below error message in email, and a copy of the configuration is NOT created.
Syntax error: EOF in backquote substitution
Syntax error: Error in command substitution
I have tried some online syntax checker tools for my command to determine why these errors are occurring, but I have not had any luck. My experience with Unix command line shell is very minimal, but slowly growing.
My machine build is FreeNAS-9.10.2-U1 (86c7ef5).
Any assistance with this would be greatly appreciated. Thank you!