Comment 4 for bug 346285

Revision history for this message
Jean-Peer Lorenz (peer.loz) wrote : Re: [wishlist] Add option to abort backup if destination directory does not exist

Yes, prismatic7, you're right under certain circumstances. I've tested the issue more extensivly and experienced the following:

* I set the destination to a directory on an external disk (here /media/transfer/backups), where `transfer` is the volume label
* creation of backups as normal user and superuser works as expected
* after unmounting the external disk and invoking of NSsbackup, no backup is created and an error message is displayed (holds for normal users and superusers)

I think, this is the expected behaviour, isn't it?

* If I set the destination directly to the external disk (here /media/transfer), where `transfer` is the volume label
* creation of backups as normal user and superuser works as expected
* after unmounting the external disk and invoking of NSsbackup, no backup is created and an error message is displayed if the application is executed as normal user
* if NSsbackup is executed as superuser, a directory /media/transfer is created and used

This should not happen :-( This bug is confirmed.

Why does this happen? This behaviour occurs in the case (that was not expected) the backup directory is set to the root directory of an external disk. If the user specifies a directory on the disk for the backups, everything works as it should work. (BTW: I've never thought that someone would set the whole disk (i.e. the root directory of the disk) as backup target.)

Despite, the `right` behaviour needs to be defined:
1. the destination directory should be created (not recursivly, i.e. only the last directory in the directory tree) and an additional option is added
2. the destination directory should never be created and the backup is aborted and an error message is displayed, in the case that the specified directory does not exist.

In case 1) an option would be reasonable but not helpful for unexperienced users. It makes NSsbackup more complicated and the possibility of writing into the /media directory still exists.

In case 2) an additional option wouldn't be neccessary since aborting the backup would be the default behaviour.

My suggestion: The default behaviour should be as follows (case 2):
* When defining a backup profile, the backup target must be set to an existing directory.
* If this directory does not exist (when creating a backup) the process is aborted and the user gets informed.

This is the most straightforward solution (in my opinion) without additional GUI elements and easy to implement.

@prismatic7: please explain `Comparisons being odious and all, Simple Backup does have this option...` I don't understand.

Thank you for using NSsbackup and taking the time for reporting bugs.

Best regards. Jean-Peer