Thousands of "failed to process" errors being thrown each time I run a backup

Hi all,

I posted this on the github repo since I originally thought it may have been a bug, but now I’m not so sure. It’s possible I’m just doing something silly. From the github:

I’m attempting to do a broad backup of my ubuntu server to mitigate against hardware failure. I’m backing up the /var folder (ignoring cache, tmp and run) and get the following error:

Failed to process path: /var/lib/lxcfs/cgroup/blkio/system.slice/ifup@ens3.service/tasks
System.IO.IOException: Win32 IO returned 25. Path: /var/lib/lxcfs/cgroup/blkio/system.slice/ifup@ens3.service/tasks
  at System.IO.FileStream.ReadData (System.Runtime.InteropServices.SafeHandle safeHandle, System.Byte[] buf, Int32 offset, Int32 count) <0x7f8ff3160300 + 0x000a3> in <filename unknown>:0 
  at System.IO.FileStream.ReadInternal (System.Byte[] dest, Int32 offset, Int32 count) <0x7f8ff315e4a0 + 0x00076> in <filename unknown>:0 
  at System.IO.FileStream.Read (System.Byte[] array, Int32 offset, Int32 count) <0x7f8ff315e2a0 + 0x000e1> in <filename unknown>:0 
  at Duplicati.Library.Main.Blockprocessor.Readblock () <0x40ade390 + 0x00059> in <filename unknown>:0 
  at Duplicati.Library.Main.Operation.BackupHandler.ProcessStream (System.IO.Stream stream, CompressionHint hint, Duplicati.Library.Main.BackendManager backend, Duplicati.Library.Utility.FileBackedStringList blocklisthashes, Duplicati.Library.Utility.FileBackedStringList hashcollector, Boolean skipfilehash) <0x40adde50 + 0x000c3> in <filename unknown>:0 
  at Duplicati.Library.Main.Operation.BackupHandler.HandleFilesystemEntry (ISnapshotService snapshot, Duplicati.Library.Main.BackendManager backend, System.String path, FileAttributes attributes) <0x40ad94f0 + 0x01413> in <filename unknown>:0 

I’d like to be in the position where if anything went wrong with my hardware, I can just restore my setup. Should I be excluding more? Or is there something I’m not accounting for?

If your entire disk fails then restoring all files onto a new disk, using Duplicati, won’t result in a bootable system. Duplicati doesn’t account for partitions and bootloaders. It also will have trouble with a lot of locked files and such.

For that kind of use case you’ll want a full disk backup solution that can read your disk on the block level.

I’d recommend backing up files that you’re personally changing only. For example on my server I backup /etc/, because I edit a lot of different config files there, and /var/www because I install customized software there. If the disks completely fail I’ll be reinstalling the Operating system and software, then migrating my customized software and settings in.

Hi @Pectojin,

That makes a lot of sense. I guess in a failure I probably would reinstall Ubuntu from scratch and restore any files I deemed necessary. When looking for backup solutions I weighed the two approaches up and found duplicati to be the most feasible for me.

It’s possible that I’m doing this wrong, but I am aware of certain changes I’ve had to make in /var/lib to get programs running to my liking. Since lxcfs seems to be throwing these errors, do you reckon I should specifically avoid this folder, or is there another reason it would be failing here?

I would avoid backing up /var/lib/lxcfs in general as LXC will be using it for it’s entire container filesystems, but if you really want to back up LXC then this comment on stackoverflow might be useful ubuntu - How do I Backup / Move LXC containers? - Stack Overflow

Hi @rbhalla,

Because the Linux tree rooted at / is composed of so many things mounted on other things, care is required on backups, and more so on restores. “findmnt” gives a tree view. If you lack that, “df” or “mount” might help.

Some tools use default filters (Duplicati has some underway) but their defaults might not fit the exact system.

default-filters

Some tools can remain in one filesystem. Their option name typically refers to filesystem, or perhaps mount.

–one-file-system option

I’ve also heard of people getting to a desired filesystem without all of the other mounts on top by using a bind mount. For example, maybe one could bind mount / readonly somewhere safe, back it up from there, then fix paths on restore. This would get you a broad backup, and take awhile, but using snapshots like the link from @Pectojin mentions (and can be set up on other filesystems) would probably create a better quality backup.

Any plans to support snapshots on the modern Filesystems (ZFS et. al)?

The “Win32 IO returned 25” text might be mono_w32error_unix_to_win32() translating Linux’s EINVAL number into Windows ERROR_SEEK, then Duplicati reporting errors LXCFS handed it as I assume grep is doing here where you can see the grep excludes proc and sys, then errors in lxcfs/cgroup. Maybe error flow is like yours.

If this sounds reasonable, maybe you can update #3303, maybe including a reference to the discussion here.

Thanks!