pbs 2.2 and namespaces proxmox backup server

Here I am with my first post on a tool I am using since the first beta version was related.

I am using Proxmox Virtual Environment, aka pve, for more than five years and I’m very happy with it and I was really really happy when they released proxomx backup server since was missing some smart features for backup, deduplication and all the stuff needed to realize a real business infrastructure ready for all the issues the epoch we are living in demands.

With Proxmox Backup Server, aka pbs, you can easily take away backups and implement procedures like disaster recovery on the base on this piece of software.

With the 2.2 release namespaces were implemented to easily separate backups coming from different sources to resolve the issue of conflicting numbers of virtual machines.

When you sync a remote datasource from another pbs, prior to 2.2 version, you didn’t need to set up any permission on the local datastore since the ownership of backups was a mere fact of a value written in a file in the vm directory of the datastore.

root@pbsremote:/backup/remotestore1/ns/Namespace1/vm/100# ls
2022-10-24T22:00:04Z  2022-10-28T22:00:07Z  2022-11-01T23:00:03Z  2022-11-05T23:00:02Z  2022-11-09T07:09:31Z
2022-10-25T22:00:00Z  2022-10-29T22:00:10Z  2022-11-02T23:00:06Z  2022-11-06T23:00:10Z  owner
2022-10-26T22:00:02Z  2022-10-30T23:00:03Z  2022-11-03T23:00:01Z  2022-11-07T23:00:08Z
2022-10-27T22:00:00Z  2022-10-31T23:00:05Z  2022-11-04T23:00:05Z  2022-11-08T23:00:03Z
root@pbsremote:/backup/remotestore1/ns/Namespace1/vm/100# cat owner
backup@pbs

It happens that, upgrading to pbs 2.2, in a sync process that reads from remote pbs server and stores locally, and whose backups are not owned by root@pam but something else, the procedure stops working claiming permission mismatch.

Cannot sync datastore 'backup', root namespace into datastore 'remotestore1', root namespace - sync into datastore 'remotestore1', root namespace not allowed - permission check failed - missing Datastore.Backup on /datastore/remotestore1

Even if in root namespace.

This because prior to 2.2 version you didn’t have the opportunity to setup permission on namespaces (even unchanged situation fall in namespaces scenario having files stored to “root” namespace) thus leading to have lack of permission with ownership different from root@pam.

You just have to add permissions to the owner of the backups on each namespaces added.

And, if you are asking yourself if you can reorganize your past backups, the answer is Yes, and all you have to do is to move the directories of virtual machines in to the namespace as follows.

root@pbsremote:/backup/remotestore1/vm# ls
101  104  105  299  300  301  302  303  304  305  306  307  309  310  311  312  500  701  800  901  902  903
root@pbsremote:/backup/remotestore1/vm# mv * ../ns/Namespace1/vm/
root@pbsremote:/backup/remotestore1/vm# cd ../ns/Namespace1/vm/
root@pbsremote:/backup/remotestore1/ns/Genestrerio/vm# ls
100  101  104  105  299  300  301  302  303  304  305  306  307  309  310  311  312  500  701  800  901  902  903

Just remember to change sync tasks to reflect this change otherwise you will transfer all the data back again.

With namespaces you get the possibility to differentiate data retention on the basis of the source of backups without having to install multiple instances or multiple datastores on the pbs server.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.