I'm trying to create a simple cron job and I can't get the command right. I'm trying this:
cp '/var/db/system/configs-3bc724bbb18d493585697320a07060e7/FreeNAS-11.1-U6 (caffd76fa)' '/mnt/volume_2/Cloud/Neil/Documents/FreeNAS_Config_Backups/'
but when I test the command in the shell (as root), it fails with a "no such file or directory" message referring to the source directory. The source path was copied directly from the command line, so it's definitely correct. I've also tried it with backslashes to escape the space and brackets (because they were added automatically when I copied the path) and that doesn't make a difference either, though surely that shouldn't be necessary if the paths are enclosed in quotes?
I don't see how this could be a problem with the file paths, so is it a permissions issue? The source is on my boot drives (2x mirrored USB sticks), so root should have access, right? The destination is in a dataset on one of my volumes, and it's already set for all users/groups/guests to have full read/write access (I'm new to FreeNAS, so I'm not trying anything fancy with permissions, and the server shouldn't be accessible outside of my home LAN).
Assuming I can get this command to work, I was planning on just sticking it into a simple cron job running once a day to dump any/all files in that directory to my cloud, and therefore to multiple other devices. I probably need to tweak it to work unattended, but I'll worry about that later. Can anyone advise me how to fix this?
Thanks in advance.
cp '/var/db/system/configs-3bc724bbb18d493585697320a07060e7/FreeNAS-11.1-U6 (caffd76fa)' '/mnt/volume_2/Cloud/Neil/Documents/FreeNAS_Config_Backups/'
but when I test the command in the shell (as root), it fails with a "no such file or directory" message referring to the source directory. The source path was copied directly from the command line, so it's definitely correct. I've also tried it with backslashes to escape the space and brackets (because they were added automatically when I copied the path) and that doesn't make a difference either, though surely that shouldn't be necessary if the paths are enclosed in quotes?
I don't see how this could be a problem with the file paths, so is it a permissions issue? The source is on my boot drives (2x mirrored USB sticks), so root should have access, right? The destination is in a dataset on one of my volumes, and it's already set for all users/groups/guests to have full read/write access (I'm new to FreeNAS, so I'm not trying anything fancy with permissions, and the server shouldn't be accessible outside of my home LAN).
Assuming I can get this command to work, I was planning on just sticking it into a simple cron job running once a day to dump any/all files in that directory to my cloud, and therefore to multiple other devices. I probably need to tweak it to work unattended, but I'll worry about that later. Can anyone advise me how to fix this?
Thanks in advance.