How do I mount an old (single) zfs backup disk in a newly installed PBS server?

extcon

New Member
Mar 26, 2023
16
1
3
I'm learning and played around with Proxmox. I installed a PBS and created a ZFS on a single disk and added it as a datastore through the GUI. I did do a couple of backups which worked fine.
I later re-installed PBS from scratch with another single backup disk (ext4 this time). I need to restore some of the backups from the old drive. How can I mount the old ZFS disk in the new PBS server to copy over the backups to the new PBS install?
Thanks!
 
See the OpenZFS documentation for the "zpool import" command:
https://openzfs.github.io/openzfs-docs/man/8/zpool-import.8.html
Thank you. With you kind support I managed to import the zfs pool named "backups" which automatically mounted in /mnt/datastore/backups.

I copied the directories and files using cp -a -v /mnt/datastore/backups /mnt/datastore/old-backups. Not sure if the target ended up on the new ext4 drive or old zfs drive. How do I check that?

I then tried to create a new datastore using the GUI pointing to /mnt/datastore/old-backups but I got an error message that .chunks already exists.

What is the correct procedure to add the copied backup files to a new datastore?
 
Last edited:
I copied the directories and files using cp -a -v /mnt/datastore/backups /mnt/datastore/old-backups. Not sure if the target ended up on the new ext4 drive or old zfs drive. How do I check that?
Check your mountpoints. For example df -h should show them.

I then tried to create a new datastore using the GUI pointing to /mnt/datastore/old-backups but I got an error message that .chunks already exists.
There is no way using the webUI to import an existing datastore. You need to edit the /etc/proxmox-backup/datastore.cfg
 
Last edited:
  • Like
Reactions: extcon
Check your mountpoints. For example df -h should show them.


There is no way using the webUI to import an existing datastore. You need to edit the /etc/proxmox-backup/datastore.cfg
I know that the pve-backups directory (aka new-backups) is on the sda 1TB ext4 drive and I know the backups directory is pn the old sdb 4TB zfs drive. I've created the other directories manually using mkdir in the shell in /mnt/datastore. I don't know where/what disk those directories are created/located but looks to be on the systemdrive judging from the disksize. I want to copy all old backup files to the sda ext4 drive but I'm not knowledgeable enough in Linux :-(... I do appreciate your patience and kind help very much!
 

Attachments

  • disks.png
    disks.png
    83.7 KB · Views: 49
  • datastore dir.png
    datastore dir.png
    43 KB · Views: 50
  • Datastore sizes.png
    Datastore sizes.png
    65 KB · Views: 46
  • df -h.png
    df -h.png
    64.9 KB · Views: 41
  • old-backups.png
    old-backups.png
    71 KB · Views: 37
  • new-backups.png
    new-backups.png
    71.8 KB · Views: 39
Last edited:
I've created the other directories manually using mkdir in the shell in /etc/datastore
That's a bad place for a datastore. "/etc" in linux is usually only used to store config files. But according to your df -h output you probably mean "/mnt/datastore".
I don't know where/what disk those directories are created/located but looks to be on the systemdrive judging from the disksize.
Everything that is not a mountpoint is part of the root filesystem, so will end up on your system disk.

If I understand you right, you want to move the backups from the 4TB ZFS disk sdb to the 1TB sda1 ext4 disk.
Sdb is mounted to "/mnt/datastore/backups". Sda1 is mounted to "/mnt/datastore/pve-backups". You you need to copy all the files and folder, including the hidden ones (beginning with the "."), from "/mnt/datastore/backups" to "/mnt/datastore/pve-backups".
"/mnt/datastore/old-backups" is not a mountpoint, so stuff stored there is part of your root filesystem = systm disk.

I already wrote in your other thread how I would copy files so that hidden files will also be copied over remaining the correct ownerships and rights.
 

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!