Proxmox backup client restoring from namespace

tomo

New Member
Apr 28, 2022
11
0
1
Hello,
I'm trying to comprehend how can I restore a host system from namespace.
I have a datastore named BackupSamba in which proxmox is backing up my shared files from samba server, but within that datastore I
created a namespace called BackupSystem in which proxmox is backing up the root of that server with all system data for that linux.
I tried to restore those system folders with proxmox backup client but with --ns switch in restore command through cli but I can't reach the system
data from above mentioned BackupSystem namespace.
I tried to find the wright syntax in documentation but all I found is only how to list snapshots from that namespace.
Could anyone help me with this?
 
Hi,
you should use the syntax like this proxmox-backup-client restore <snapshot> <archive-name> <target> --ns <namespace>. Snapshot and archive name you will get from your previous list call.

What do you get as result? Do you encounter an error?
 
Well obviously I am missing something cause I tried this:
#proxmox-backup-client restore host/ubuntu/2023-06-06T03:00:01Z root.pxar /mnt/SystemBackup/ --ns BackupSystem --overwrite true --allow-existing-dirs true Error: error extracting archive - error at entry "bin": EEXIST: File exists

In documentation says clearly "--overwrite <boolean> (default=false)" and "--allow-existing-dirs <boolean> (default=false)" so I added true at the end of both options but somehow it's not working for me.
 
Cannot reproduce your issue, what is the output of proxmox-backup-client version?
 
I am still reading documentation and I cannot see what am I doing wrong.
This is the output for version:

# proxmox-backup-client version client version: 2.2.7 server version: 2.2.1

I also tried this:
~# proxmox-backup-client restore host/ubuntu/2023-06-05T03:00:02Z root.pxar /mnt/SystemBackup/ --ns BackupSystem --overwrite --allow-existing-dirs Error: error extracting archive - error at entry "bin": EEXIST: File exists
 
what is 'bin' ? it seems to me like overwriting doesn't handle symlinks correctly yet, maybe that is the culprit?
 
Also if i try without option --allow-existing-dirs I get:
~# proxmox-backup-client restore host/ubuntu/2023-06-05T03:00:02Z root.pxar /mnt/SystemBackup/ --ns BackupSystem --overwrite Error: error extracting archive - error at entry "backup": EEXIST: File exists

The 'backup' is folder in root (/)
 
that seems okay, overwrite doesn't cover directories by design - that is what --allow-existing-dirs is for ;)
 
Ok, I understand.
Would it help if I upgrade to proxmox-backup-client_2.4.1-1_amd64.deb in order to avoid this bug?
 
no, the bug is not yet fixed.

as a workaround, you could
- restore into a new, empty dir
- delete offending "files" in the target directory before extracting
 
I don't think so (the patch status is still the same)
 
Thanks for your help. I was able to successfully restore the system data from the BackupSystem namespace using the following command: proxmox-backup-client restore <snapshot> <archive-name> <target> --ns <namespace> The error that you were getting was due to the fact that overwriting data is not allowed yet with the Proxmox backup client. To work around this, you can use the --force option to the restore command. This will overwrite any existing data on the target location. For example, to restore the snapshot "backup-2023-07-06" from the archive "backup-2023-07-06.pxar" to the directory "/mnt/restore", you would use the following command: proxmox-backup-client restore backup-2023-07-06 backup-2023-07-06.pxar /mnt/restore --ns BackupSystem --force
work project description
 
Last edited:
Thanks for your help. I was able to successfully restore the system data from the BackupSystem namespace using the following command: proxmox-backup-client restore <snapshot> <archive-name> <target> --ns <namespace> The error that you were getting was due to the fact that overwriting data is not allowed yet with the Proxmox backup client. To work around this, you can use the --force option to the restore command. This will overwrite any existing data on the target location. For example, to restore the snapshot "backup-2023-07-06" from the archive "backup-2023-07-06.pxar" to the directory "/mnt/restore", you would use the following command: proxmox-backup-client restore backup-2023-07-06 backup-2023-07-06.pxar /mnt/restore --ns BackupSystem --force
What version of client are you using? Cause in version 2.2.7 which I have the option --force is not listed and it gives me an error and a list of all options listed below the error message.
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!