[SOLVED] How to move old backup to a new special device

Ting

Member
Oct 19, 2021
96
4
13
56
Hi,

I setup a new ssd as a special device to my backup server storage pool, and I had some old backup on the storage pool (all spin disks before), how to rewrite these old backup and so new meta data can be written onto that ssd special device?

thanks in advance.
 
If backups are rewritten, this is done for new backups. If you want to rewrite the existing pool, you have to copy it to another location (same pool if enough space is available) and then copy it back again if the target is an other host. For example a local copy:

Code:
zfs snapshot <pool>/backup_data@snap_for_rewrite
zfs send -v <some-pool>/backup_data@snap_for_rewrite | zfs receive <some-pool>/targetdataset

You can find some examples also here.
 
Last edited:
  • Like
Reactions: Johannes S
Hi, Johannes;

Thanks for your reply. Here is my code, please double check whether It will work or not,

I have two zfs pool, data1 (which I want to snapshot and rewritten the same pool), rpool (which has proxmox on it). and data1 has enough space for a duplicated copy.

zfs snapshot data1/backup_data@snap_for_rewrite
zfs send -v data1/backup_data@snap_for_rewrite | zfs receive data1

My question:
1. above is correct?
2. do I suppose to transfer this sanpshot to some other pool and then restore back?
 
Hii
I’ve set up a similar SSD for my backup server before, and what worked for me was using a backup tool like Acronis or even something simple like FreeFileSync. I just pointed it to the SSD and made sure to select the option to overwrite the old backups on the spin disks. If your software has a feature for managing metadata, definitely check that out, as it can help keep everything in sync.
 
Hey;

Thanks for your reply. I am not sure. I had a old pool with spin disks, and I just added a ssd as an special device into the pool, and want to rewrite the whole pool (existing pool) so my special device can take effect.
 
zfs snapshot data1/backup_data@snap_for_rewrite
zfs send -v data1/backup_data@snap_for_rewrite | zfs receive data1

My question:
1. above is correct?
One little thing is still missing. The name of the new data set must also be specified at the destination.

Code:
zfs send -v data1/backup_data@snap_for_rewrite | zfs receive data1/backup_data_new

If it was cloned successfully, you can delete the old dataset (stop backup services that access it first) and rename the new dataset so that it has the same name again. After all is working fine, you can start all backup services and delete the snapshot from your cloned ZFS dataset. Here some example:

Code:
systemctl stop proxmox-backup-proxy.service proxmox-backup.service
zfs destroy -r <poolname>/<datasetname> # Destroy the old dataset with all snapshots
zfs rename -p data1/backup_data_new data1/backup_data
systemctl start proxmox-backup-proxy.service proxmox-backup.service
zfs destroy data1/backup_data@snap_for_rewrite

do I suppose to transfer this sanpshot to some other pool and then restore back?
Only if there was not enough space in the local pool. Data only needs to be rewritten.

You can also use the TAB-key after you write a command like "zfs snapshot", or "zfs destroy" so that possible paths are automatically extended.
 
Last edited:
  • Like
Reactions: Johannes S

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!