WL#5886: MEB: option which allows to set owner if mysqlbackup is running as root

Status: Un-Assigned

If mysqld started as mysql user and user who wants to make backup logged using own
account she needs to use sudo so mysqlbackup is able to access InnoDB files.
After this run backup files saved under permissions of user root. This is fine
so far.

When same user wants to restore backup she needs to use sudo again and all files
restored with root owner. This prevents MySQL server from starting.

See BUG#60789 for example.

Proposal:

Add such an option, say --unix-user, so when mysqlbackup is running as root it
can set owner of restored/backed up files as user specified.

Ingo: I am a bit confused by this proposal. What would be the advantage to use

  sudo mysqlbackup --unix-user mysql

over

  sudo -u mysql mysqlbackup

?

Sveta: there are can be 2 advantages:

1. This will be compatible with mysqld's option --user
2. Can create backups of mysqld running by one user and save it under
permissions of another user.

When I created this WL I had in mind only option 1.