This setting does have a gotcha, however. It does the check for whether the directory exists before it calls the script named in cmd_preexec – so if you were hoping to mount your drive in the pre-exec script, you can’t! I was very confused why my rsnapshot configuration didn’t work to start with. My workaround is to run a separate mount script before calling rsnapshot in a cron job, not ideal but it does work for me.
rsnapshot is a great tool that I use for all my backup stuff, its really easy and seems pretty robust (or rather, I haven’t broken it yet!). When I set it up most recently, I discovered that it has a very useful flag, no_create_root. The problem I often have is that since I back up to removable media, if the disk isn’t mounted, rsnapshot will back up to the local drive instead, in the mount point – and then I’ll promptly run out of space. Stopping rsnapshot from creating directories means no writing rubbish into your mount point, and this setting is designed specifically for this issue with removable media.