stash icon indicating copy to clipboard operation
stash copied to clipboard

Backup/Restore summaries + option to fail backups on permission issues

Open asoltesz opened this issue 5 years ago • 1 comments

Now, that Stash runs as non-root by default (v0.9+), it is especially easy to make the mistake of running it against a container with root and not having anything backed up/restored. This was probably a much smaller problem before v0.9.

There are still a lot of containers that run as root (e.g.: pgAdmin) which make this issue important.

Currently neither Stash, nor Restic will give any meaningful warning that it encountered folders that it was supposed to back up but couldn't due to permission issues (since the backed container runs as root, all folders will be owned by root and permissions may not be forgiving even for reading by other users).

The end result is that everything seems normal/successful but neither backup, nor restore actually happens. This is very problematic since it introduces a big unpredictability factor.

Stash should include a clear and very visible backup/restore summary on the container log that includes the number of files backed up and the number of files/folders skipped due to missing permissions.

It should also include a list about the folders/files which were skipped due to missing permissions.

Along the same line of thought:

There should be field in the BackupConfiguration that instructs Stash/Restic to fail immediately when it encounters a file/folder that its should back up but can't due to missing permissions. This should be "true" by default so that Stash works in a predictable way. If the user/admin accepts to possibility of skipping files/folders, they will set it to "false" and know about it.

This is partially a mitigation of switching to non-root by default which introduced this unpredictability.

asoltesz avatar May 07 '20 11:05 asoltesz

@asoltesz Thank you for your feedback. We will take a look.

hossainemruz avatar May 07 '20 11:05 hossainemruz