Backup in LXC with Proxmox 4.1

charlesm1888

New Member
Apr 7, 2016
8
0
1
36
Hello:

I made a backup to one of my LXC VPS, but I noted that when I restore one of my backup no all files are backuped correctly, for instance the content in "/run", also in "/var/log", etc. The problem is that the daemons can't start.

I have a second HDD con LVM + Snapshot to save the backup. Also I noted that the backup snapshot don't work with LXC, but Proxmox try to use the "suspend" mode.

The next lines show the snapshot backup output:

INFO: starting new backup job: vzdump 100 --storage pve-backup --remove 0 --mode snapshot --compress lzo --node pm01
INFO: Starting Backup of VM 100 (lxc)
INFO: status = running
INFO: mode failure - some volumes do not support snapshots
INFO: trying 'suspend' mode instead
INFO: backup mode: suspend
INFO: ionice priority: 7
INFO: starting first sync /proc/9307/root// to /mnt/pve-backup/dump/vzdump-lxc-100-2016_04_11-22_53_20.tmp

Thanks in advance.

Regards, Carlos
 
If you have LXC on ext4 then it will not be able to do snapshot and will use suspend instead. That is just a known limitation. You can use ZFS instead for LXC if you need it to do snapshots.
More information here: https://pve.proxmox.com/wiki/Backup_and_Restore
  • snapshot (LXC): Use storage snapshots, as long as the storage support this, for example ZFS or Ceph (no downtime, online)

As far as the files missing from the backup, that is another issue... one I've not experienced to say the least.
 
If you have LXC on ext4 then it will not be able to do snapshot and will use suspend instead. That is just a known limitation. You can use ZFS instead for LXC if you need it to do snapshots.
More information here: https://pve.proxmox.com/wiki/Backup_and_Restore
  • snapshot (LXC): Use storage snapshots, as long as the storage support this, for example ZFS or Ceph (no downtime, online)

As far as the files missing from the backup, that is another issue... one I've not experienced to say the least.

Thanks for your answer, I going to use ZFS for my backup volume.
 
You can include them by setting --stdexcludes 0

Thanks dietmar for your answer, its work!!

I have another question: is possible to add that option to the vzdump default? Because I made the backup from de Proxmox GUI, otherwise I need to do the backup from the command line.

I know that global configuration is stored in /etc/vzdump.conf but I don't know how to issue that option in that file...
 
Thanks dietmar for your answer, its work!!

I have another question: is possible to add that option to the vzdump default? Because I made the backup from de Proxmox GUI, otherwise I need to do the backup from the command line.

I know that global configuration is stored in /etc/vzdump.conf but I don't know how to issue that option in that file...

Simply set
Code:
stdexcludes: 0
in /etc/vzdump.conf

Disabling a default option by default does not make much sense.
 
  • Like
Reactions: Ovidiu
Simply set
Code:
stdexcludes: 0
in /etc/vzdump.conf

Disabling a default option by default does not make much sense.

Thanks for your answer. Is means that this option is 0 by default? I ask because when I do a backup for the GUI some files are missing, as I said above...
 
also noticed missing directories in /var/log ... this caused restored lxc to not start apache and mysql until creating log directories.

so I tried putting this in vzdump.conf : stdexcludes: 0

30 minutes ago did a test backup and restore ... the directories are still missing in /var/log/
 
I see there is already a bug report and fix, will test that asap: https://bugzilla.proxmox.com/show_bug.cgi?id=926
The above solution don't work for me... I can see some options for stdexcludes in /usr/share/perl5/PVE/VZDump.pm:

Code:
stdexcludes => {
        type => 'boolean',
        description => "Exclude temorary files and logs.",
        optional => 1,
        default => 1,
},

I changed "optional" and "defualt" to 0, but don't work.

For the moment the solution is make a backup manually and add the option --stdexcludes 0
 
The fixed package (pve-manager >= 4.1-23) has not yet reached pve-enterprise, but will soon.
 
Is this fixed yet, really sucks not having backup and restore function be reliable in the GUI cost me at least a couple days of my time
NOTE i'm using enterprise version here
 
I have upgraded to version 4.2 and still have issues with lxc backups excluding some important files, is this going to be fixed? or do i need to adjust my system to get full backups of lxc machines
 
hi, did you put
Code:
stdexcludes: 0
in your vzdump.conf ?
 

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!