Lxc export seems very slow and does not show progress, how can I monitor it?

I am running lxc 4.15 on Ubuntu 20.04.2 LTS (GNU/Linux 5.4.0-74-generic x86_64).

I am trying to export a (Gentoo) container for backup purposes using the following command:

lxc export venable-zebra -v --compression xz

I entered this command about 40 minutes ago and it is still not exiting. I did a top and I see this:

top - 22:31:10 up 52 min,  2 users,  load average: 1.81, 1.66, 1.50
Tasks: 187 total,   2 running, 185 sleeping,   0 stopped,   0 zombie
%Cpu(s): 36.9 us,  4.4 sy,  0.0 ni, 29.8 id, 28.4 wa,  0.0 hi,  0.3 si,  0.2 st
MiB Mem :   3936.1 total,    123.9 free,   2012.8 used,   1799.3 buff/cache
MiB Swap:   2048.0 total,   2047.2 free,      0.8 used.   1683.3 avail Mem 

    PID USER      PR  NI    VIRT    RES    SHR S  %CPU  %MEM     TIME+ COMMAND                                                                                              
   1829 root      20   0  106284  95932    520 R  69.9   2.4  44:23.91 xz                                                                                                   
   1138 root      20   0 1949452 115704   5900 S  10.3   2.9   4:51.58 lxd 

So clearly there is an xz process running and when I attach to it with strace I can see that it is definitely working on something.

It’s really unfortunate that this command doesn’t provide any progress information. I have no insight into what is happening. I’ve aborted two previous lxc export commands and I’m concerned about uncollected garbage being left over from those. Where is lxc export working? What intermediate files is it generating? Where are they stored? Do I need to manually collect garbage if I’ve aborted previous lxc export commands?

Okay, it just finished. The only progress indicator I had during the entire process was this message:

Backup exported successfully!

My 5 GB container took a full hour to export, so I can’t see this being useful for routine container backups. What’s the recommended approach for backups?

1 Like

Agreed. Not having a progress indicator is really annoying. The publish command at least gave you live stats even though it doesn’t say how much is completed.

1 Like

Please create an issue at https://github.com/lxc/lxd/issues regarding adding progress status to that command so it can be tracked. Thanks

1 Like

I’ve added https://github.com/lxc/lxd/issues/9711.

1 Like


when will this become live? realy love to see a progress indicator on a export

Will be in LXD 4.22 which we’re expecting to be out in mid-January

1 Like