Skip to content

Proxmox Backup Server: How to rename a namespace

Abstract

This guide explains how to rename a namespace in Proxmox Backup Server (PBS). The process consists of creating a new namespace and move the snapshots there from the old namespace


Pre-Requisites


Steps to Move Namespaces

1. Stop Backup Jobs

Before proceeding, stop any backup jobs. This prevents conflicts during the migration.

  1. Go to the dashboard in PBS.
    pbs-setup
  2. Identify jobs targeting the namespace.
  3. Stop or temporarily disable these jobs.

2. Create a namespace with the new name

  • Go to Datastore > Content > Add namespace in the PBS interface. I have named my new namespace "lumbridge_snapshots_local"
    pbs-setup

3. Moving snapshots to the new namespace

  1. Open a shell on PBS
  2. Navigate to your datastore:
    cd /mnt/datastore/<YourDatastoreName>/ns
    
    Below you can see that I have currently 2 namespaces:
  3. lumbridge_snapshots (which is the old namespace name)
  4. lumbridge_snapshots_local (which is the new namespace name)

    root@ardougne:/mnt/datastore/HDD-storage-5Tb/ns# ls 
    
    falador_snapshots  lumbridge_snapshots 
    

  5. To move the snapshots to the new namespace, you can use a simple move (mv) command. Example:

mv lumbridge_snapshots/ lumbridge_snapshots_local/  

Info

This move will be instant, as it will only changes the pointers to the data.

4. Make Proxmox Virtual Environment (PVE) aware of the move

Now we need to fix the link in PVE. As the PVE instance currently does not know that its snapshots have been moved to a new namespace. Below a screenshot that the backups are not visible for the container 'Samba'.
pbs-setup

Sadly we can't fix this from the GUI currently. But the fix is easy enough through the cli.

  1. In PVE, open a shell
  2. Navigate to the storage config:
    nano /etc/pve/storage.cfg
    
    pbs-setup
  3. Add at the bottom "namespace" + "the name of your namespace". (note: the screenshot shows the wrong namespace name. It should be "lumbridge_snapshots_local")
  4. Save and exit
  5. Restart the necessary services to apply the change:
    systemctl restart pvedaemon pveproxy 
    

Now we go back in PVE to the backups of our vm's and ct's, we should our backups again (make sure you select the correct storage): pbs-setup