dup handler silently fails if cache directory isn't created
When creating a backup from scratch, if the parent of the archive_dir used by duplicity commands is not present, the duplicity job will silently fail and the user will be told the operation was a success:
nosmo@Hologram-Rose backupninja =) $ sudo ./src/backupninja -t -d -n -f ./etc/backupninja.conf
Debug: check_perms etc/backup.d
Debug: perms: drwx--x---
Debug: gperm: --x
Debug: wperm: ---
Debug: check_perms etc/backup.d/example.dup
Debug: perms: -rwx------
Debug: gperm: ---
Debug: wperm: ---
Info: >>>> starting action etc/backup.d/example.dup (because of --now)
Debug: yes
Debug: executing handler in locked section controlled by /var/lock/backupninja/etc_backup.d_example.dup
Debug: Data will be encrypted with the GnuPG key KEY_ID.
Debug: Data will be signed will the GnuPG key KEY_ID.
Debug: LC_ALL=C duplicity cleanup --force --s3-european-buckets --s3-use-new-style --no-print-statistics --ssh-options '' --encrypt-key KEY_ID --sign-key KEY_ID --full-if-older-than 30D --archive-dir /var/cache/backupninja/duplicity s3+http://my-backup/
Debug: LC_ALL=C duplicity remove-older-than 60D --force --s3-european-buckets --s3-use-new-style --no-print-statistics --ssh-options '' --encrypt-key KEY_ID --sign-key KEY_ID --full-if-older-than 30D --archive-dir /var/cache/backupninja/duplicity s3+http://my-backup/
Debug: LC_ALL=C duplicity --s3-european-buckets --s3-use-new-style --no-print-statistics --ssh-options '' --encrypt-key KEY_ID --sign-key KEY_ID --full-if-older-than 30D --archive-dir /var/cache/backupninja/duplicity --include '/Users/nosmo/backupdir/' --exclude '**' / s3+http://my-backup/
Info: <<<< finished action etc/backup.d/example.dup: SUCCESS
Debug: send report to root
Info: FINISHED: 1 actions run. 0 fatal. 0 error. 0 warning.
nosmo@Hologram-Rose backupninja =) $ s3cmd la #shows no files created
nosmo@Hologram-Rose backupninja =) $ duplicity cleanup --force --s3-european-buckets --s3-use-new-style --no-print-statistics --ssh-options '' --encrypt-key KEY_ID --sign-key KEY_ID --full-if-older-than 30D --archive-dir /var/cache/backupninja/duplicity s3+http://my-backup/
Specified archive directory '/var/cache/backupninja/duplicity/02e017f45f73d304fffffc79694f8d2c' does not exist, or is not a directory
This isn't exactly a critical issue as not having this directory present could be considered a failed install, but having a check with a fatal error here makes the source of the issue clear to the user.