"Previous volume not finished, call FinishVolume..." error

I’m trying to back up a large data set (170 GB) to a network share on a local server. Did a small set of files (~20G) to test and everything worked fine. Now I am trying to finish the rest of the files. I keep getting an error, “Previous volume not finished, call FinishVolume before starting a new volume.” When I look at the stored logs I see:

The last few Live log entries are:

Sep 23, 2017 10:41 PM: Failed disposing index volume
{"ClassName":"System.InvalidOperationException","Message":"Attempted to dispose an index volume that was being written","Data":null,"InnerException":null,"HelpURL":null,"StackTraceString":" at Duplicati.Library.Main.Volumes.IndexVolumeWriter.Dispose()\r\n at Duplicati.Library.Main.Operation.BackupHandler.Dispose()","RemoteStackTraceString":null,"RemoteStackIndex":0,"ExceptionMethod":"8\nDispose\nDuplicati.Library.Main, Version=2.0.2.1, Culture=neutral, PublicKeyToken=null\nDuplicati.Library.Main.Volumes.IndexVolumeWriter\nVoid Dispose()","HResult":-2146233079,"Source":"Duplicati.Library.Main","WatsonBuckets":null}


Sep 23, 2017 10:41 PM: Fatal error
{"ClassName":"System.InvalidOperationException","Message":"Previous volume not finished, call FinishVolume before starting a new volume","Data":null,"InnerException":null,"HelpURL":null,"StackTraceString":" at Duplicati.Library.Main.Volumes.IndexVolumeWriter.StartVolume(String filename)\r\n at Duplicati.Library.Main.Operation.BackupHandler.UpdateIndexVolume()\r\n at Duplicati.Library.Main.Operation.BackupHandler.FinalizeRemoteVolumes(BackendManager backend)\r\n at Duplicati.Library.Main.Operation.BackupHandler.Run(String[] sources, IFilter filter)\r\n at Duplicati.Library.Main.Controller.<>c__DisplayClass16_0.<Backup>b__0(BackupResults result)\r\n at Duplicati.Library.Main.Controller.RunAction[T](T result, String[]& paths, IFilter& filter, Action1 method)\r\n at Duplicati.Library.Main.Controller.Backup(String inputsources, IFilter filter)\r\n at Duplicati.Server.Runner.Run(IRunnerData data, Boolean fromQueue)",“RemoteStackTraceString”:null,“RemoteStackIndex”:0,“ExceptionMethod”:“8\nStartVolume\nDuplicati.Library.Main, Version=2.0.2.1, Culture=neutral, PublicKeyToken=null\nDuplicati.Library.Main.Volumes.IndexVolumeWriter\nVoid StartVolume(System.String)”,“HResult”:-2146233079,“Source”:“Duplicati.Library.Main”,“WatsonBuckets”:null}`


Sep 23, 2017 7:24 PM: Failed disposing index volume
{"ClassName":"System.InvalidOperationException","Message":"Attempted to dispose an index volume that was being written","Data":null,"InnerException":null,"HelpURL":null,"StackTraceString":" at Duplicati.Library.Main.Volumes.IndexVolumeWriter.Dispose()\r\n at Duplicati.Library.Main.Operation.BackupHandler.Dispose()","RemoteStackTraceString":null,"RemoteStackIndex":0,"ExceptionMethod":"8\nDispose\nDuplicati.Library.Main, Version=2.0.2.1, Culture=neutral, PublicKeyToken=null\nDuplicati.Library.Main.Volumes.IndexVolumeWriter\nVoid Dispose()","HResult":-2146233079,"Source":"Duplicati.Library.Main","WatsonBuckets":null}


Sep 23, 2017 7:24 PM: Fatal error
{"ClassName":"System.InvalidOperationException","Message":"Previous volume not finished, call FinishVolume before starting a new volume","Data":null,"InnerException":null,"HelpURL":null,"StackTraceString":" at Duplicati.Library.Main.Volumes.IndexVolumeWriter.StartVolume(String filename)\r\n at Duplicati.Library.Main.Operation.BackupHandler.UpdateIndexVolume()\r\n at Duplicati.Library.Main.Operation.BackupHandler.FinalizeRemoteVolumes(BackendManager backend)\r\n at Duplicati.Library.Main.Operation.BackupHandler.Run(String[] sources, IFilter filter)\r\n at Duplicati.Library.Main.Controller.<>c__DisplayClass16_0.<Backup>b__0(BackupResults result)\r\n at Duplicati.Library.Main.Controller.RunAction[T](T result, String[]& paths, IFilter& filter, Action1 method)\r\n at Duplicati.Library.Main.Controller.Backup(String inputsources, IFilter filter)\r\n at Duplicati.Server.Runner.Run(IRunnerData data, Boolean fromQueue)",“RemoteStackTraceString”:null,“RemoteStackIndex”:0,“ExceptionMethod”:“8\nStartVolume\nDuplicati.Library.Main, Version=2.0.2.1, Culture=neutral, PublicKeyToken=null\nDuplicati.Library.Main.Volumes.IndexVolumeWriter\nVoid StartVolume(System.String)”,“HResult”:-2146233079,“Source”:“Duplicati.Library.Main”,“WatsonBuckets”:null}`

Any ideas on what could be causing the problem and preventing the backup from running successfully?

It looks there is a bug in the code that cause the dinosaur file to fail. How big is that file?
The IO error I don’t know the reason for.

The problem with the “Previous volume not finished” is one I have seen before, but not managed to figure out what causes it. I have a larger rewrite almost done, that I think will fix it.

That file is around 1.2G. The machine is a media server, so most of the files are between 600M and 1.5G (some even a bit larger) .

When you get a fix developed will there be a new release? Does Duplicati automatically upgrade to new releases or is that a manual process? (I’m still new to the product and haven’t been through an update cycle yet).

Tried the full backup again. Deleted destination files and local database, so basically a clean slate. Still get the same error:

image

I’m dead in the water at this point. I can’t get a complete backup set. Any ideas where I can start looking or any parameter changes that might help?

I have prioritiezed completing the concurrent_processing branch as it removes this particular problem, simply by not keeping the volumes open in the same way.

Unfortunately, I do not have a quick-fix for it, and not sure how to further debug it, as it does not happen on any of my test machines :confused:

Understood. I am rerunning the backup set using a 1G block instead of a 2G block to see if that makes any difference. I’ll let you know what happens. In the meantime, I have some other tests to run so that will keep me occupied for a while. Appreciate you looking into this. Standing by…

Do you mean you have --blocksize=1GB ?
Or was it --dblock-size=1GB?
(Annoying name clash …)

I am not aware of anyone using so large a setting for blocksize but it should work fine, at least up to 2GB (aka int32.MaxValue).

I’m referring to the Volume Size setting in the main configuration screen (not the advanced options), so I believe that’s the dblock size? I set it to 2GB based on my conversation with drakar2007 in this thread.

Ok, that should be all good with 2GB.

Hmmm - I am not yet backing up my media collection in Duplicati.

Will I have trouble with a collection where files range from 4G to 30G?

I have backed up large multi-gigabyte files on other systems in the house, there is just something different about this one that is causing errors. I’m going to do some more testing and see if I can figure out what’s up.I’ll report back with what I find.

I am working on a rewrite of some of the code involved here, and I expect this to clear up the issue.

Kenneth,

I have been running Duplicati almost a year without any problems. It’s been working fantastic backing up to Google Drive.

But all of a sudden, I have been experiencing the following error saying:
Previous volume not finished call FinishVolume before starting a new volume. And the backup won’t finish.

I have rebuilt the database but still have this message popping up.
Please advise what to do.

Best Regards
JJ

I’m assuming nothing has changed recently in your backup (no config changes, no Duplicati updates, no Google Drive account changes, etc.).

  1. Did you recently have a large number of file changes or some large files start getting backed up (such as a new video file)?

  2. If you look at the details of the log entry messages are you seeing any “Failed to process path” errors as seen in the OP screenshot?

Sorry for the late reply. But now when I was about to make a backup so I could collect the log files for you it started to work again :slight_smile: just out of the blue. I really do appreciate that you answered me!

Still a questions lingers in my mind is how to backup opened files. During the day I work on some Photoshop or Excel files and in the evening I normally don’t close them and have the backup setup for running during the early hours but every time I get a warning that these opened files where not backed up since they are “open”.

Is there anyway to solve it?

Best Regards

I think the underlying error message was eaten somewhere, and then you end up with the “Previous volume not finished” message that says nothing about what went wrong. Since it started working again, whatever caused it appears to be fixed (connection issue, update on Google’s end, etc.).

You need to run VSS, which will allow Duplicati to back up open files. You do this by setting the advanced option --snapshot-policy=required. Unfortunately, this requires that you run Duplicati as Administrator (not UAC, as the SYSTEM user). The easiest way to set it up, is to configure Duplicati to run as a service, as shown here:

Hi, I will check this out right away! Huge thanks!

I just got this problem as well but I’m running on a Mac, not on Windows. What’s the scoop here? The “HD” has been running for about 5 days (backing up one hard drive), just finished sometime today. The DHJOfficeHD1 is a second backup job I created a few days ago that was (apparently) waiting for the first job to finish.

screenshot_2599

Ken, did all the necessary steps regarding adding Duplicati as a service but now I’m getting the following error:

Fatal error
System.UnauthorizedAccessException: Attempted to perform an unauthorized operation.
at Alphaleonis.Win32.Vss.VssBackupComponents…ctor()
at Alphaleonis.Win32.Vss.VssImplementation.CreateVssBackupComponents()
at Duplicati.Library.Snapshots.WindowsSnapshot…ctor(String[] sourcepaths, Dictionary2 options) at Duplicati.Library.Snapshots.SnapshotUtility.CreateWindowsSnapshot(String[] folders, Dictionary2 options)
at Duplicati.Library.Main.Operation.BackupHandler.GetSnapshot(String[] sources, Options options, ILogWriter log)
at Duplicati.Library.Main.Operation.BackupHandler.Run(String[] sources, IFilter filter)

What could be wrong?

/JJ

It looks to me like the account the service is running under may not have VSS permissions. When you set up the service did you run Duplicati as Administrator SYSTEM (not SYSTEM Administrator) as kenkendk suggested?

You can test if this actually is the issue by either:

  1. If you are sing the --snapshot-policy=required changing it to “Auto” (the error should go away, but you won’t be using snapshots)
  2. Change the service to run under an Administrator account