Pbm delete-backup is not working

Hello.

My problem:

root@backup# /usr/bin/pbm delete-backup -f 2020-11-02T11:35:26Z --mongodb-uri="mongodb://mongo1.server:27000/"
Waiting for delete to be done ..[done]
Backup snapshots:
  2020-11-02T11:35:26Z

pbm can`t delete backup archive from a remote server “backup.server”. But on the host, this command works.
Logs :

1/02 15:32:30 Got command delete [{delete { } { } { 0} 1604320350}]
350}]
1/02 15:32:43 Got command delete [{delete { } { } { 0} 1604320363}]
363}]
1/02 15:33:39 Got command delete [{delete { } { } { 0} 1604320419}]

Servers:

 mongo1.server 
pbm-agent --mongodb-uri "mongodb://localhost:27100/ # Shard1 Primory 
pbm-agent --mongodb-uri "mongodb://localhost:27200/ # Shard2 Secondary
pbm-agent --mongodb-uri "mongodb://localhost:27000/ # Config Primory
mount ftp@ftp.com/backup /mnt/mongo_backup
14   840 ACCEPT     all  --  *      *       backup.server       0.0.0.0/0

 mongo2.server 
mongos
pbm-agent --mongodb-uri "mongodb://localhost:27100/ # Shard1 Primory 
pbm-agent --mongodb-uri "mongodb://localhost:27200/ # Shard2 Secondary
pbm-agent --mongodb-uri "mongodb://localhost:27000/ # Config Primory
mount ftp@ftp.com/backup /mnt/mongo_backup
14   840 ACCEPT     all  --  *      *       backup.server       0.0.0.0/0

arbirt.server
pbm-agent --mongodb-uri "mongodb://localhost:27100/ # Shard1 arbitr  
pbm-agent --mongodb-uri "mongodb://localhost:27200/ # Shard2 arbitr
pbm-agent --mongodb-uri "mongodb://localhost:27000/ # Config arbitr
14   840 ACCEPT     all  --  *      *       backup.server       0.0.0.0/0

backup.server
/usr/bin/pbm 
mount ftp@ftp.com/backup /mnt/mongo_backup

Good commands:

root@backup# /usr/bin/pbm backup --mongodb-uri="mongodb://mongo1.server:27000/"
Starting backup '2020-11-02T11:35:26Z'...................
Backup '2020-11-02T11:35:26Z' to remote store '/mnt/mongo_backup' has started

root@backup# /usr/bin/pbm backup list --mongodb-uri="mongodb://mongo1.server:27000/" 
Backup snapshots:
  2020-11-02T11:35:26Z

Help my plz. Now I can only delete backups from mongo1.server,mongo2.server,arbirt.server.

Hi, this could be an issue with NFS setup… Create a test file manually and try removing it from the remote servers. Does it work?

if you can paste here the content of /etc/exports on the nfs server and the output of mount command on the client side.

I did not quite get your idea.

mongo1.server# echo 'password' |sshfs -o reconnect,allow_other user@user.ftp-backup.com:/mongo_backup /mnt/mongo_backup/ -o password_stdin
mongo1.server# mount | grep mnt 
user@user.ftp-backup.com:/mongo_backup on /mnt/mongo_backup type fuse.sshfs (rw,relatime,user_id=0,group_id=0,allow_other)

I successfully create backups on different servers:

mongo1.server# /usr/bin/pbm backup --mongodb-uri="mongodb://mongo2.server:27000/"


Starting backup '2020-11-02T18:04:05Z'....................


Backup '2020-11-02T18:04:05Z' to remote store '/mnt/mongo_backup' has started


mongo1.server# /usr/bin/pbm list --mongodb-uri="mongodb://mongo2.server:27000/"


Backup snapshots:


 2020-11-02T18:04:05Z
mongo2.server# /usr/bin/pbm backup --mongodb-uri="mongodb://mongo1.server:27000/"


Starting backup '2020-11-02T18:05:22Z'...................


Backup '2020-11-02T18:05:22Z' to remote store '/mnt/mongo_backup' has started


mongo2.server# /usr/bin/pbm list --mongodb-uri="mongodb://mongo1.server:27000/"


Backup snapshots:


 2020-11-02T18:04:05Z


 2020-11-02T18:05:22Z
backup.server# /usr/bin/pbm backup --mongodb-uri="mongodb://mongo1.server:27000/"


Starting backup '2020-11-02T18:07:46Z'....................


Backup '2020-11-02T18:07:46Z' to remote store '/mnt/mongo_backup' has started


backup.server# /usr/bin/pbm list --mongodb-uri="mongodb://mongo1.server:27000/"


Backup snapshots:


 2020-11-02T18:04:05Z


 2020-11-02T18:05:22Z


 2020-11-02T18:07:46Z

I did not quite get your idea.

mongo1.server# echo ‘password’ |sshfs -o reconnect,allow_other user@user.ftp-backup.com:/mongo_backup /mnt/mongo_backup/ -o password_stdin

mongo1.server# mount | grep mnt

user@user.ftp-backup.com:/mongo_backup on /mnt/mongo_backup type fuse.sshfs (rw,relatime,user_id=0,group_id=0,allow_other)

I successfully create backups on different servers:

mongo1.server# /usr/bin/pbm backup --mongodb-uri=“mongodb://mongo2.server:27000/”

Starting backup ‘2020-11-02T18:04:05Z’…

Backup ‘2020-11-02T18:04:05Z’ to remote store ‘/mnt/mongo_backup’ has started

mongo1.server# /usr/bin/pbm list --mongodb-uri=“mongodb://mongo2.server:27000/”

Backup snapshots:

2020-11-02T18:04:05Z

mongo2.server# /usr/bin/pbm backup --mongodb-uri=“mongodb://mongo1.server:27000/”

Starting backup ‘2020-11-02T18:05:22Z’…

Backup ‘2020-11-02T18:05:22Z’ to remote store ‘/mnt/mongo_backup’ has started

mongo2.server# /usr/bin/pbm list --mongodb-uri=“mongodb://mongo1.server:27000/”

Backup snapshots:

2020-11-02T18:04:05Z

2020-11-02T18:05:22Z

backup.server# /usr/bin/pbm backup --mongodb-uri=“mongodb://mongo1.server:27000/”

Starting backup ‘2020-11-02T18:07:46Z’…

Backup ‘2020-11-02T18:07:46Z’ to remote store ‘/mnt/mongo_backup’ has started

backup.server# /usr/bin/pbm list --mongodb-uri=“mongodb://mongo1.server:27000/”

Backup snapshots:

2020-11-02T18:04:05Z

2020-11-02T18:05:22Z

2020-11-02T18:07:46Z

Deleting backup files from backup.server fails. (backup.server has only pbm and doesn`t have pbm-agent)

backup.server# /usr/bin/pbm delete-backup -f 2020-11-02T18:07:46Z --mongodb-uri=“mongodb://mongo1.server:27000/”

Waiting for delete to be done …[done]

Backup snapshots:

2020-11-02T18:04:05Z

2020-11-02T18:05:22Z

2020-11-02T18:07:46Z

backup.server# /usr/bin/pbm delete-backup -f 2020-11-02T18:05:22Z --mongodb-uri=“mongodb://mongo2.server:27000/”

Waiting for delete to be done …[done]

Backup snapshots:

2020-11-02T18:04:05Z

2020-11-02T18:05:22Z

2020-11-02T18:07:46Z

Deleting backup files from mongo1,2.server always works.

mongo2.server# /usr/bin/pbm delete-backup -f 2020-11-02T18:05:22Z --mongodb-uri=“mongodb://:27000/”

Backup snapshots:

2020-11-02T18:04:05Z

2020-11-02T18:07:46Z

mongo1.server# /usr/bin/pbm delete-backup -f 2020-11-02T18:07:46Z --mongodb-uri=“mongodb://mongo2.server:27000/”

Backup snapshots:

2020-11-02T18:04:05Z

1 Like

Ok I see what you mean now, sorry I didn’t get it before. This looks like a bug, would you mind opening a ticket in https://jira.percona.com/projects/PBM/issues with the info?

1 Like

I can do it. Do I need to copy the comands from this dialogue to the ticket or is it enough to attach the link to this dialogue?

1 Like

https://jira.percona.com/browse/PBM-582

1 Like