Storage size when restorting .tar.gz container

Sharky04

Active Member
Oct 30, 2018
11
0
41
45
When restoring a .tar.gz backup of a container the correct storage and ram size is restored too.

Where is that information saved? Inside the .tar.gz backup?
 
For containers, it is stored inside the tar file. The first file of the tar archive contains the VM config.
 
I mean the filename of the VM config file inside the tar archive where the ram and storage size is stored.

I know dump files are in /var/lib/vz/dump
 
'./etc/vzdump/pct.conf'
(you can check the contents of a tar.lzo archive with `tar --lzop -tf $tar.lzo`)

I hope this helps!
 
Thanks. Since the UI doesn't allow to size down containers I plan to do a backup, change the rootfs size inside pct.conf, then restore with smaller size.
 
That did work. I have sized down a container from 40 to 8 GB. It would be neat if during restore the size of the container could be configured.
 
That did work. I have sized down a container from 40 to 8 GB. It would be neat if during restore the size of the container could be configured.

it does (on the CLI/API level, but not exposed on the GUI). you can actually totally reconfigure the container when restoring, including splitting up mountpoints differently than they were before ;)
 
  • Like
Reactions: Stoiko Ivanov