Proxmox Backup Server: move snapshots to new or existing namespaces
Abstract
This guide explains how to migrate snapshots to new or existing namespaces within Proxmox Backup Server (PBS)
Pre-Requisites
- Proxmox Backup Server installed
- Proxmox VE cluster installed and setup
- Proper user permissions to manage namespaces.
Steps to Move Namespaces
1. Stop Backup Jobs
Before proceeding, stop any backup jobs. This prevents conflicts during the migration.
- Go to the dashboard in PBS.
- Identify jobs targeting the namespace.
- Stop or temporarily disable these jobs.
2. Create a new namespace
- Go to Datastore > Content > Add namespace in the PBS interface. I have named my new namespace "falador_snapshots_local"
3. Moving snapshots to the new or existing namespace
- Open a shell on PBS
- Navigate to your datastore:
All snapshots are currently not in a namespace will be under the folders /ct (container) and /vm (virtual machine). If you are already using namespaces, these snapshots will be under the folder /ns
- To move the snapshots to your new namespace, you can use a simple move (mv) command. Example:
Info
This move will be instant, as it will only changes the pointers to the data.
3. 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'.
Sadly we can't fix this from the GUI currently. But the fix is easy enough through the cli.
- In PVE, open a shell
- Navigate to the storage config:
- Add at the bottom "namespace" + "the name of your namespace"
- Save and exit
- Restart the necessary services to apply the change:
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):