First, getting your FreeNAS back online. Your pool should be fine. Did you type 'mount -ro /' when you got done modifying the files? It's too late now if you didn't.
1) Get another USB key and load it with FreeNAS, same flavor you were using.
2) Boot up the new USB key. Hopefully you saved your config file because here is where it will come in handy, restore it and reboot.
3) You should be up and running. If your pool did not automatically import then do an Automatic Import. Now you should be up and running.
4) Make a damn backup of those photos on DVD(s) before your wife kills you!
I simplified it drastically just to verify the cp command works fine...
File Name: backup.sh
Code:
#!/bin/bash
cp -r /mnt/peanuts/DATA/qtest/ /mnt/peanuts/DATA/qtest2/
And this works fine.
I tried the following as well and it worked too.
Code:
#!/bin/bash
VSOURCEDIR=/mnt/peanuts/DATA
VDESTDIR=/mnt/peanuts/DATA
cp -r $VSOURCEDIR/qtest/ $VDESTDIR/qtest2/
(my VM pool is called peanuts)
When I ran them I typed 'sh backup.sh'
Are you trying to copy only the files in "qtest" or do you also want to copy the folder name "qtest" into the "qtest2" directory? My example above does only the files within "qtest" and then copies them to "qtest2". If you try to copy "qtest" itself, you can easily screw up and copy "qtest2" into itself. Pay attention to the "/" marks at the end of the paths.
So does your script work when you command it in an SSH window or does it fail there? Or is it only when you try to run it from a CRON that it fails?
And please keep it simple until you can get the basic function working. I do understand adding in all the extra code but as temperamental as these scripts are it's just easier to keep it simple.