← 返回命令列表

Linux command

pct-restore 命令

文件

复制后可按需替换文件名、目录或参数。

常用示例

Restore container from backup

pct restore [VMID] [/path/to/backup.tar.zst]

Restore with specific storage

pct restore [VMID] [backup.tar.zst] --storage [local-lvm]

Restore without starting

pct restore [VMID] [backup.tar.zst] --start 0

Restore with new hostname

pct restore [VMID] [backup.tar.zst] --hostname [newname]

Restore unprivileged

pct restore [VMID] [backup.tar.zst] --unprivileged 1

说明

pct restore restores an LXC container from a Proxmox backup file. It can restore to a new VMID, different storage, or with modified settings.

参数

vmid
New container ID.
backup
Backup file path.
--storage _name_
Target storage.
--hostname _name_
Set hostname.
--start _bool_
Start after restore.
--unprivileged _bool_
Unprivileged container.
--rootfs _spec_
Root filesystem spec (e.g., local-lvm:20 for 20GB).
--memory _MB_
Set container memory limit.
--pool _name_
Add the container to the specified resource pool.
--force _bool_
Allow overwriting existing container.
--ignore-unpack-errors _bool_
Ignore errors during backup unpacking.

FAQ

What is the pct-restore command used for?

pct restore restores an LXC container from a Proxmox backup file. It can restore to a new VMID, different storage, or with modified settings.

How do I run a basic pct-restore example?

Run `pct restore [VMID] [/path/to/backup.tar.zst]` in a terminal, then adjust file names, paths, flags, or remote targets for your system.

What does vmid do in pct-restore?

New container ID.