Move LXC container to different storage type

xmftech

New Member
Jan 11, 2025
4
0
1
Hello,

I am in the process of migrating some LXC containers from one host to another where I have different types of storage. The source host where the container is located has ZFS storage and the destination host has XFS (LVM). How should I proceed?

I have tried to make a copy of the container but I don't know how to restore it. I tried searching for it before posting but I couldn't find any similar threads.

Thank you
 
Last edited:
I installed krusader on Ubuntu and connected via GUI to both hosts.

Since in this case I was transferring an LXC container installed from https://community-scripts.github.io/ I reinstalled it on the destination host and it created a new container with a different ID

I then located the backup of the source host in /var/lib/vz/dump and copied it to the same location on the destination host

I renamed the backup file to match the ID of the destination host and restored the backup.

Would this be the correct procedure?
 
Would this be the correct procedure?
You probably did not need to recreate the LXC again with that script on the target node.

You simply copy that backup file to a backup location on the new node, (for example as you did to /var/lib/vz/dump), & then simply restore that backup choosing (in GUI) the new storage location under Storage: & the new CTID you wish under CT:

You may need some tweaking depending on your specific LXC in use. (Such as mountpoint/s etc.).

Good luck.
 
You probably did not need to recreate the LXC again with that script on the target node.

You simply copy that backup file to a backup location on the new node, (for example as you did to /var/lib/vz/dump), & then simply restore that backup choosing (in GUI) the new storage location under Storage: & the new CTID you wish under CT:

You may need some tweaking depending on your specific LXC in use. (Such as mountpoint/s etc.).

Good luck.
I will try restoring without creating the container with the next container I need to move from source host.
 

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!