Backups fails when coming across some files already in use

The backup is failing with last errors coming across 3 files that cant be backed up because they are already in use.
Is there a way to make duplicacy ignore these errors and continue?

On some OSes -vss flag is supported that could be preferable to skipping those files

how do i use that? note that files change that are being used. sometimes they are sometimes they are not, so excluding those files manually would be too much work.

Add this flag to backup command. It works on windows and macOS

It does not matter. Duplicacy will make a snapshot and backup data from it.

Besides avoiding touching open files this will guarantee that all data is backed up at the state it was in same point of time.

ah, VSS makes a local copy of everything? I do not have enough disk space for that, so i guess the -vss isnt a option for me.

It doesn’t make a copy, it uses the OSs shadow copy (*not a copy) feature to take a snapshot of the volume, before running the backup. The snapshot uses negligible disk space.

thanks. attempting to do this results in a error:
ERROR VSS_CREATE Only administrators can create shadow copies.

While im launching the duplicacy shortcut as administrator.

As far as I know, on Windows, you should install Duplicacy as a service to use VSS. In order to do this, you have to run the installer as Administrator, and at the last step there will be an option to install as a service. Please note though, that it will not preserve your current configuration, but will create a new .duplicacy-web directory under C:\ProgramData. I don’t know if simply copying the current .duplicacy-web directory from your user directory can make it work.

Duplicacy can work this way without installing as a service… however, if you try to “Run as administrator”, you need to make sure Duplicacy isn’t already running, as it’ll have no effect and you’ll still have a Duplicacy instance running as non-admin.

I’d recommend doing as @palver suggests and install as a service, though.

Make sure to Quit the running Duplicacy in the icon tray before reinstalling. To move your existing configuration, copy the .duplicacy-web directory from C:\Users\<username> to C:\ProgramData. Remember to run the installer as admin and you’ll get the option to install as a service after.

1 Like

thanks! that did the trick. however, errors are persisting. It fails with the last entry’s in the log being:

2020-12-05 17:25:50.110 WARN OPEN_FAILURE Failed to open file for reading: open \?\D:\Cache\localhost\0.duplicacy\shadow\Backup Symbolic Links\D Drive\Muziek~Spotify Offline Cache\index.dat: Het proces heeft geen toegang tot het bestand omdat het door een ander
proces wordt gebruikt.
2020-12-05 17:26:11.106 WARN OPEN_FAILURE Failed to open file for reading: open \?\D:\Cache\localhost\0.duplicacy\shadow\Backup Symbolic Links\D Drive\Muziek~Spotify Offline Cache\ac\ac2ec7a456cec1d1731b9648b258982526fc4bc9.file: Het proces heeft geen toegang tot het bestand omdat het door een ander
proces wordt gebruikt.
2020-12-05 17:26:50.551 ERROR CHUNK_MAKER Failed to read 0 bytes: read \?\D:\Cache\localhost\0.duplicacy\shadow\Backup Symbolic Links\D Drive\Portable Apps\tportable.1.0.29\Telegram\tdata\user_data\cache\0\binlog: Het proces heeft geen toegang tot het bestand omdat een gedeelte van het bestand door een ander proces is vergrendeld.
2020-12-05 17:26:50.554 INFO VSS_DELETE The shadow copy has been successfully deleted
Failed to read 0 bytes: read \?\D:\Cache\localhost\0.duplicacy\shadow\Backup Symbolic Links\D Drive\Portable Apps\tportable.1.0.29\Telegram\tdata\user_data\cache\0\binlog: Het proces heeft geen toegang tot het bestand omdat een gedeelte van het bestand door een ander proces is vergrendeld.

(no access to the file because locked to another process)

anyone know? it always results in these errors when backing up.

Not answering the question directly (there is some trickery with filesystems that VSS can’t deal with either — like memory mapped files perhaps? Not an expert on windows) — but why are you backing up cache directories in the first place?

Add this line to your filters list:

-*/cache/*

To exclude directories named “cache”. It does not make sense to backup those. You might want to review what’s being backup up and maybe exclude more transient stuff — like temp folders and browse caches, logs, stuff like that. The less garbage is being picked up the faster your data you actually care about gets backed up.

I fully agree.

Or, even more comprehensively, for folders and files (no slash):

-*cache*
-*Cache*

(yes, I know it can be done for case insensitive with regex, but i hate regex…)

This might be too aggressive, and swallow other misfortunately named files with “cache” in the name somewhere that are not necessarily cache, like: iFoundPirateCache.jpg

Reflex is for lazy people - less typing. Easier to write but harder to read.

e:(?i).*/caches?/.*

Case insensitive, matches zero or more characters followed by /cache/ or /caches/, with slashes, and then sequence of zero or more characters.

1 Like

unfortunately still fails, with the same error log as i posted in my last reply, while the exception is in place:

anyone have a idea how to solve this?

On the same file? That is supposed to be excluded?

correct, same error…

I don’t think your current filter -*/cache/* would exclude all of the files previously showing up with OPEN_FAILURE lines. If you’re sticking with the glob filter instead of regex, I think you’d need to add a new filter to exclude files like this one:

2020-12-05 17:26:11.106 WARN OPEN_FAILURE Failed to open file for reading: open \?\D:\Cache\localhost\0.duplicacy\shadow\Backup Symbolic Links\D Drive\Muziek~Spotify Offline Cache\ac\ac2ec7a456cec1d1731b9648b258982526fc4bc9.file: Het proces heeft geen toegang tot het bestand omdat het door een ander
proces wordt gebruikt.

For example, I think this one would need something like

-*/*Spotify Offline Cache/*

or

-*/* Cache/*

depending on how specific you want to be.

Does the

-*/* Cache/*

command exclude any directory and file with that name?