Skip to content

Do database backup under unprivileged user #425

Open
@php-coder

Description

@php-coder
Owner

We can create special user backup for doing backups. He will have limited amount of permissions and also we can use its password in ~/home/mystamps/.my.cnf file.

The following steps should be done:

  • backup user in MySQL should be created (with limited access: only from localhost and it should have permissions that allows to doing backup only)
  • /data/mystamps/.my.cnf file should be updated on the server with new login/password
  • /etc/cron.d/mystamps should be modified to use backup user
  • mystamps-backup Ansible role should be updated to reflect this changes
  • instruction should be updated

Tech debt for: #116

Quote from mysqldump documentation:

mysqldump requires at least the SELECT privilege for dumped tables, SHOW VIEW for dumped views, TRIGGER for dumped triggers, and LOCK TABLES if the --single-transaction option is not used. Certain options might require other privileges as noted in the option descriptions.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @php-coder

        Issue actions

          Do database backup under unprivileged user · Issue #425 · php-coder/mystamps