Docker & Snapshots?

Are snapshots supported when running Duplicati via docker? I’ve tried both the duplicati/duplicati and the linuxserver/duplicati images to no avail. Whenever I select snapshot-policy as “Required” (I want it to fail if the snapshot doesn’t work), it instantly fails and throws the error below.

I’m just looking to back up one folder to another, but that folder has some sqlite DBs and i’d need snapshots due to them being open/locked.

Anything I’m missing?

System.Exception: The external command failed to start.
Error message: System.ComponentModel.Win32Exception (0x80004005): 
ApplicationName='/app/duplicati/lvm-scripts/', CommandLine='"/dockerdata/"', 
CurrentDirectory='', Native error= Access denied
at System.Diagnostics.Process.StartWithCreateProcess (System.Diagnostics.ProcessStartInfo 
startInfo) [0x0029f] in <5bf358e735be486487282a37cb3bce80>:0 
at System.Diagnostics.Process.Start () [0x0003a] in <5bf358e735be486487282a37cb3bce80>:0 
at (wrapper remoting-invoke-with-check) System.Diagnostics.Process.Start()
at System.Diagnostics.Process.Start (System.Diagnostics.ProcessStartInfo startInfo) [0x0001b] in 
at Duplicati.Library.Snapshots.LinuxSnapshot+SnapShot.ExecuteCommand (System.String 
program, System.String commandline, System.Int32 expectedExitCode) [0x00049] in 
Command: /app/duplicati/lvm-scripts/ "/dockerdata/"
at Duplicati.Library.Snapshots.LinuxSnapshot+SnapShot.ExecuteCommand (System.String 
program, System.String commandline, System.Int32 expectedExitCode) [0x000f5] in 
at Duplicati.Library.Snapshots.LinuxSnapshot+SnapShot.Initialize (System.String folder) [0x00010] 
in <e2815415a41f468e87ce853d8f434f04>:0 
at Duplicati.Library.Snapshots.LinuxSnapshot+SnapShot..ctor (System.String path) [0x00047] in 
at Duplicati.Library.Snapshots.LinuxSnapshot..ctor (System.Collections.Generic.IEnumerable`1[T] 
sources) [0x000e5] in <e2815415a41f468e87ce853d8f434f04>:0 
at Duplicati.Library.Snapshots.SnapshotUtility.CreateLinuxSnapshot 
(System.Collections.Generic.IEnumerable`1[T] folders) [0x00000] in 
at Duplicati.Library.Snapshots.SnapshotUtility.CreateSnapshot 
(System.Collections.Generic.IEnumerable`1[T] folders, 
System.Collections.Generic.Dictionary`2[TKey,TValue] options) [0x0000f] in 
at Duplicati.Library.Main.Operation.BackupHandler.GetSnapshot (System.String[] sources,  
Duplicati.Library.Main.Options options) [0x00024] in <c6c6871f516b48f59d88f9d731c3ea4d>:0 
at Duplicati.Library.Main.Operation.BackupHandler.RunAsync (System.String[] sources, 
Duplicati.Library.Utility.IFilter filter) [0x01031] in <c6c6871f516b48f59d88f9d731c3ea4d>:0 
at CoCoL.ChannelExtensions.WaitForTaskOrThrow (System.Threading.Tasks.Task task) [0x00050] 
in <6973ce2780de4b28aaa2c5ffc59993b1>:0 
at Duplicati.Library.Main.Operation.BackupHandler.Run (System.String[] sources, 
Duplicati.Library.Utility.IFilter filter) [0x00008] in <c6c6871f516b48f59d88f9d731c3ea4d>:0 
at Duplicati.Library.Main.Controller+<>c__DisplayClass13_0.<Backup>b__0 
(Duplicati.Library.Main.BackupResults result) [0x00035] in 
at Duplicati.Library.Main.Controller.RunAction[T] (T result, System.String[]& paths, 
Duplicati.Library.Utility.IFilter& filter, System.Action`1[T] method) [0x00271] in 
at Duplicati.Library.Main.Controller.Backup (System.String[] inputsources, 
Duplicati.Library.Utility.IFilter filter) [0x00068] in <c6c6871f516b48f59d88f9d731c3ea4d>:0 
at Duplicati.Server.Runner.Run (Duplicati.Server.Runner+IRunnerData data, System.Boolean 
fromQueue) [0x00307] in <fe28905ee30b422e8d475f1cfdb85515>:0

Hi @SlothCroissant, welcome to the forum!

What version of Duplicati are you running and what OS is the container running on?

My GUESS is that snapshots from Docker won’t work as the container is somewhat isolated from the rest of the OS.


Have you found a solution please? I have the same problem.


What is the host platform running your docker container? Where are you trying to create the snapshots, on that same host platform?

I’m running Duplicati in a docker container on a Ubuntu server and I’m trying to Backup the ubuntu server and put the backup file on google drive. I made the Snapshot required as the server will be in use while doing the backup.


      - PUID=0
      - PGID=0
      - TZ=Europe/Paris
      - "traefik.enable=true"
      - ""
      - "traefik.http.routers.duplicati.rule=Host(`---`)"    
      - "traefik.http.routers.duplicati.tls=true"      
      - "traefik.http.routers.duplicati.tls.certresolver=myresolver"   
      - ./duplicati/config:/config
      - duplicati_backups:/backups
      - /:/source/server
      - private
    restart: unless-stopped

Yeah I’m not sure how this could be accomplished. Duplicati certainly can’t do it natively. All it knows how to do out of the box is create an LVM snapshot on Linux (note you must be using LVM!), and a VSS snapshot on Windows.

Docker containers don’t have this kind of access to the host system so I don’t know how you could trigger it from a container.

I’m sure you know snapshots aren’t required on Linux to back up in-use files (unlike Windows). But snapshots are good at giving you a static view of the filesystem while the backup runs, of course.

1 Like

Thank you for your reply, I thought it would corrupt the backup if I did not use the snapshot so thanks for the clarification.

The backup itself won’t be corrupt, but an in-use file that is being backed up while simultaneously being modified may not be internally consistent. It may only be “crash consistent.”

1 Like