Error unable to determine volume group (VG) in macOS

Hi,

I’ve compiled Duplicati 2.0.3.3 beta for macOS High Sierra 10.13.4 myself but I’m facing some problems. When I setup a backup job with the advanced option snapshot-policy activated, the job returns an error:

Fatal error
System.Exception: The external command failed to start.
Error message: Duplicati.Library.Interface.UserInformationException: The script returned exit code 255, but 0 was expected: Exit code: 255
Error: unable to determine volume group (VG) for /Users/dev/Documents/BSBackupIcon.png


  at Duplicati.Library.Snapshots.LinuxSnapshot+SnapShot.ExecuteCommand (System.String program, System.String commandline, System.Int32 expectedExitCode) [0x000d3] in <2be220318a714f97a1ac5d13c83b05be>:0 
Command: /Applications/Duplicati.app/Contents/Resources/lvm-scripts/find-volume.sh "/Users/dev/Documents/BSBackupIcon.png"
  at Duplicati.Library.Snapshots.LinuxSnapshot+SnapShot.ExecuteCommand (System.String program, System.String commandline, System.Int32 expectedExitCode) [0x000e4] in <2be220318a714f97a1ac5d13c83b05be>:0 
  at Duplicati.Library.Snapshots.LinuxSnapshot+SnapShot.GetVolumeName (System.String folder) [0x00010] in <2be220318a714f97a1ac5d13c83b05be>:0 
  at Duplicati.Library.Snapshots.LinuxSnapshot+SnapShot..ctor (System.String path) [0x00040] in <2be220318a714f97a1ac5d13c83b05be>:0 
  at Duplicati.Library.Snapshots.LinuxSnapshot..ctor (System.String[] sources, System.Collections.Generic.Dictionary`2[TKey,TValue] options) [0x000c2] in <2be220318a714f97a1ac5d13c83b05be>:0 
  at Duplicati.Library.Snapshots.SnapshotUtility.CreateLinuxSnapshot (System.String[] folders, System.Collections.Generic.Dictionary`2[TKey,TValue] options) [0x00000] in <2be220318a714f97a1ac5d13c83b05be>:0 
  at Duplicati.Library.Snapshots.SnapshotUtility.CreateSnapshot (System.String[] folders, System.Collections.Generic.Dictionary`2[TKey,TValue] options) [0x0000f] in <2be220318a714f97a1ac5d13c83b05be>:0 
  at Duplicati.Library.Main.Operation.BackupHandler.GetSnapshot (System.String[] sources, Duplicati.Library.Main.Options options, Duplicati.Library.Main.ILogWriter log) [0x00024] in <ae134c5a9abb455eb7f06c134d211773>:0 
  at Duplicati.Library.Main.Operation.BackupHandler.Run (System.String[] sources, Duplicati.Library.Utility.IFilter filter) [0x002b4] in <ae134c5a9abb455eb7f06c134d211773>:0 

After examining the make-dmg.sh script I found out that lvm-scripts folder appears in the variable UNWANTED_FILES so the folder is removed on the compile process.

If I manually copy the lvm-scripts folder in /Applications/Duplicati.app/Content/Resources and I run Duplicati as service the same error appears.

I made sure that the service is running as root, and it is.

I can see on find-volume.sh that this error appears when lvs commands are executed. I tried to execute lvs commands on terminal for test purposes and the system is unable to found lvs command. Does that mean that is not possible to use snapshots on macOS? How can I use duplicati to copy, for example, an Outlook Data File (.pst) that is opened at the same time of the backup and obviously locked by Outlook?

I hope somebody can shed some light :slight_smile:

Thanks!

Anyone can help? We’ve ran out of ideas

@kenkendk
@Pectojin
@ts678

snapshot-policy doesn’t work on MacOS since it doesn’t use LVM.

To add to what @Pectojin said (thanks for saying it – I know little about macOS, but have been reading…), this surprisingly seems not supported by three third-party programs I looked at, despite an API and process for backup developers to apply to use it. Maybe it hurts too much? Meanwhile, I’ll discuss some alternatives.

Home > CrashPlan > Version 6 > Backup > Back up Microsoft Outlook data recommends export to a .olm file.

If you’re into C# code, I think Duplicati’s bug is steering you into a Linux path that as far as I know doesn’t fit:


which might have been fooled by below. macOS is Linux in some ways, but not Logical volume management.

and if you’re into macOS doings, I wonder if tmutil (maybe you can get a man page) could replace the Linux LVM commands that Duplicati is mistakenly trying to do. I did see many complaints about not having enough control over the snapshots though, especially around retention (kept too long, purged too soon, and so on). Scripting options might help implement, or maybe you could even edit the scripts you’ve been going through to actually work with macOS. If you come up with a solution or something closer than this, please let us know. There hasn’t been a whole lot of call for this that I’ve found, though I did find Any plans to support snapshots on the modern Filesystems (ZFS et. al)? which also got into this idea of building adaptations of current work.

Thanks for your replies.

I found that for mac the command is diskutil, but the file system isn’t a logic volume. But I don’t understand exacly how work the snapshot.

Thanks for all.