How does --snapshot-policy work with multiple source volumes?

I have waded through a huge number of discussions here, but have not found the answer.

Currently, I am not using snapshots on either of my laptops, and I am not running Duplicati as sysadmin. However, I am interested in setting up Duplicati on both machines in such a way that I could use the Duplicati web UI from both machines on both machines. For that, I would have to run Duplicati on them both as sysadmin, and if I do that, then later on, I might get to a point of giving --snapshot-policy a try.

So my question is for background only, I am not asking for immediate, urgent support.

On my Windows laptop, I have two internal disks. By default, Win10 has enabled VSS on the system disk (SDD), but not on the other disk (HDD). My “Home” backup job includes folders from both disks (and sends the backups to an external disk). If I were to enable --snapshot-policy for this job, I should of course enable VSS on both disks. But the question is would I have to split the backup job into two separate jobs for --snapshot-policy to work properly?

On the other laptop, I have an encrypted Ubuntu installation, which uses LVM volumes by default. In order to enable --snapshot-policy, I would first have to make room for the LVM snapshots that I want Duplicati to create (btw. it would be a courtesy to remind the user about this too in Duplicati manual). On Ubuntu, my “Home” backup set includes files from two different LVM volumes, which both reside on the only internal disk. So the question raises again: does --snapshot-policy work with a backup job that includes files from multiple (partitions or) LVM volumes? How does Duplicati decide where to place the LVM snapshots? Can I help Duplicati in making that decision?

What do you mean by this, exactly? Are you talking about the “System Protection” option in System Properties, where Windows will take snapshots on its own? If so, that doesn’t matter. On the PC I’m using right now I have “System Protection” set to “Off” but Duplicati can still utilize snapshots. As long as you haven’t disabled the “Volume Shadow Copy” service you should be fine. (This service is normally set to Manual - Windows starts/stops it as needed to create snapshots.)

Regarding multiple volumes, I believe Duplicati snapshots both at the same time - at the start of the job. Snapshots are deleted once the backup completes.

I don’t know anything about LVM snapshots - hopefully someone else can answer that question.

Good luck.

1 Like

Ah, I see. I am more familiar with Unix/Linux, not so much Windows.

So VSS is zero-config from user’s point of view? Except of course the Visual C++ redist package, which does not seem to come with Win10 by default.

With LVM, the user needs to ensure that the physical LVM volume is not all used up, so the snapshots can be created in the free space. After an encrypted Ubuntu installation, LVM takes up the whole partition reserved for Ubuntu, and the user must shrink one of the logical LVM volumes to make room for the snapshots. So from the point of advising users (in Duplicati manual, FAQ etc.), LVM and VSS require different things from the user: VSS requires the Visual C++ redist package, and LVM needs free space.

So far so good.

Yep. But yes there must be some amount of free space on the volume, enough to hold the data changes that happen while the snapshot exists (duration of backup job).

I suppose some software may require that component to create snapshots depending on what framework or libraries were used in the software. But such software should include any such dependencies with the installation package. I’d be surprised if Duplicati requires you to manually install it.

See FAQ · duplicati/duplicati Wiki · GitHub. It is a specific version of the redist. Many versions come with Windows by default, but not this specific version, for reasons I have no idea of.

I would be surprised if it came with Duplicati.

Interesting… I did not install anything manually but my systems may have already had that C++ redistributable installed. It’s quite standard for programs to install the redist if they need it. I’m really surprised Duplicati doesn’t include it - IMO they should.

In that case, the FAQ entry is outdated (should mention more versions)?

It may not be. Many programs utilize those redistributables so another application may have installed it.

I do think Duplicati should install it though. Only reason I can think of NOT to include it in the installer is to keep the size down. (Edit: in that case the installer could detect if you already have it, and if not it could download it from MS for you and trigger the installation. I have seen some applications do that.)

Wha? The FAQ entry says Duplicati requires a specific version, depending on Duplicati version (and the FAQ entry states clearly that you must have exactly that specific version, e.g. a newer version won’t do). But I don’t have the version mentioned in the FAQ entry, so it has not come with Duplicati. If you are right and I don’t need to install anything, then the FAQ entry is outdated; the newest Duplicati versions require yet another specific version. Or maybe you are wrong, and to use --snapshot-policy. I do have to install that specific version, because it does not come with Duplicati.

There aren’t exactly that many versions. My system has a combination of x86 and x64 versions from 2005, 2008, 2010, 2012, etc. Other application installers undoubtedly installed the one they needed - that is standard practice on Windows. Here’s a screen shot of my installed programs list:

It’s interesting that I apparently do NOT have the 2015 one that is supposedly “required” fro snapshots to work. lol

I’m not sure the FAQ was right when updated on Aug 27, 2017 here because AlphaVSS Changelog says

Version 1.4.0 (2017-03-13)

  • Now requires Visual C++ Redistributable for Visual Studio 2017

Meanwhile, Microsoft has been busy reducing the level of insanity from these super-specific versionings:

Microsoft ends Visual C++ Redistributable Chaos

Introducing the Universal CRT

The Great C Runtime (CRT) Refactoring

Bottom line is that the current plan can be seen here:

The latest supported Visual C++ downloads

And maybe a download for desired language is here:

Windows 10 Universal C Runtime

Note that it’s not just for Windows 10, but Windows 10 ships it by default, so desktop issue will die down. There are some mentions in the forum and issues on what may be done to improve this. I didn’t study all. Would one of you like to pick up from these hints to see if you think the FAQ should just get another edit?

EDIT: The v2.0.1.57-2.0.1.57_canary_2017-05-17 update to AlphaVSS 1.4.0 (from 1.2.4000.3) was here.

If the use of VSS is zero-config, the discussion of redistributables is a mere distraction here. What is more important is to remind Linux users (ordinary, non-tech-savvy users) that LVM is not zero-config.

For example, on Ubuntu there are two possible setups. One is unencrypted Ubuntu installation, which does not use LVM out of thre box (but has it installed). In this case, the user has to shrink one of the partitions and then designate the free space for a physical LVM volume. This is not difficult, as it can be done via Disks (a GUI). The other case is encrypted Ubuntu installation, where the user has to shrink the existing logical LVM volume to free some space inside the physical LVM volume. To do this, the user has to open a terminal and type in the right command. All one needs to do is make room by shrinking the locgical volume, nothing else, but for an ordinary user, it can be a big step.

For this reminder, FAQ perhaps is the right place, but maybe a few words could be added also to the manual on --snapshot-policy.

The manual seems to accept specific words (pretty reasonable – an SME is useful, perhaps you?) as:

Corrections/changes/additions may be submitted as a pull request at Github: GitHub - kees-z/DuplicatiDocs: Duplicati User's Manual

I didn’t choose LVM, and on some distros it seems to best be set at initial OS install. This is a big catch, however there’s probably a limited amount Duplicati can do, especially since it probably varies. Manual:

On Linux this uses Logical Volume Management (LVM) and requires root privileges.

and possibly quite a bit more, such as having the foresight (how?) to have installed the right way, or the technical skills to fix things later. There also might be some expectations of the script that looks at LVM:

duplicati/Duplicati/Library/Snapshots/lvm-scripts/find-volume.sh

Invalid Handle to Path was an unsuccessful attempt to debug that with whatever elementary OS set up. Currently (as you can see there) I can’t lead people through LVM. The balance for the manual would be something more than the quote above which ends at root privileges., and less than a full tutorial…

Backing further out of diversions from original questions, It looks like design can handle multiple source volumes on both Linux and Windows. The particular storage allocation used is OS-specific. Linux uses lvcreate --snapshot here to allocate from the free physical extent pool (says its man page). Windows is

How is the diff area location determined?

so it looks like one has a limited amount of control (perhaps using tools such as vssadmin), but not full.

Yeah, I agree, you can’t foresee all. It’s just that the FAQ entry puts so much emphasis on the redistributable that it got me derailed into believing that information was somehow relevant. I think it could be trimmed quite a bit.

I don’t expect you to give the full story on LVM, just remind the user that it is not zero-config by saying something as simple as you probably need to make room for the snapshots. Just enough that the user is not surprised if --snapshot-policy does not work out-of-the-box on Linux. That’s all.

The original question arose from my not understanding the Windows environment so well.