Uploaded image for project: 'Percona Backup for MongoDB'
  1. Percona Backup for MongoDB
  2. PBM-547

Allow deleting backups from local filesystem by moving delete operations to pbm-agents

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Done
    • Priority: Medium
    • Resolution: Fixed
    • Affects Version/s: 1.2.0
    • Fix Version/s: 1.3.2
    • Component/s: None
    • Labels:
      None

      Description

      It's impossible to delete backup from local FS:

      > pbm backup
      Starting backup '2020-09-02T11:06:40Z'....................
      Backup '2020-09-02T11:06:40Z' to remote store '/tmp/local_backups' has started
      
      > ls -alh /tmp/local_backups
      -rw-rw-r--. 1 pbm  pbm  1.4K Sep  2 11:07 2020-09-02T11:06:40Z.pbm.json
      -rw-rw-r--. 1 pbm  pbm  5.0K Sep  2 11:07 2020-09-02T11:06:40Z_rs1.dump.s2
      -rw-rw-r--. 1 pbm  pbm   780 Sep  2 11:07 2020-09-02T11:06:40Z_rs1.oplog.s2
      
      > ps aux | grep pbm
      pbm      16375  1.1  4.3 1119592 82784 ?       Ssl  11:05   0:02 /usr/bin/pbm-agent
      
      > pbm list
      Backup snapshots:
        2020-09-02T11:06:40Z
      
      > pbm delete-backup 2020-09-02T11:06:40Z
      Are you sure you want delete backup(s)? [y/N] y
      Error: delete files from storage: delete oplog 2020-09-02T11:06:40Z_rs1.oplog.s2: remove /tmp/local_backups/2020-09-02T11:06:40Z_rs1.oplog.s2: permission denied
      

      The issue is caused by the fact that backup is done by pbm-agent, but it's removed by pbm CLI, which is usually executed under different user than pbm.

      There are several workarounds - either add write permissions on folder for all users in system, or add current user to pbm group, however, perfectly no extra actions should be required to execute delete-backup command.

        Attachments

          Activity

            People

            Assignee:
            andrew.pogrebnoi Andrii Pogrebnoi
            Reporter:
            sandra.romanchenko Sandra Romanchenko
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:

                Time Tracking

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - Not Specified
                Not Specified
                Logged:
                Time Spent - 1 day, 1 hour, 53 minutes
                1d 1h 53m

                  Smart Checklist