Downgrading / reverting to a lower version


#1

WARNING! Due to changes in database versions it is not possible (well, very hands-on) to downgrade ACROSS these versions (as of 2018-10-28):

  • 2.0.1.7 (using version 3 - 0 & 2 usage in preview releases only)
  • 2.0.1.18 (move to version 4)
  • 2.0.3.4 (move to version 5)
  • 2.0.3.12 (move to version 6 - see Release: 2.0.3.12 (canary) 2018-10-23)

If you do and notice your server not starting, try running Duplicati.Server.exe from the command line. If you get a database version error such as A serious error occurred in Duplicati: System.Exception: Failed to create, open or upgrade the database. then you’ll have to put the newer version folder back (or see “How to add versions…” block below).

Alternatively, you could revert to the backup automatically during the upgrade (usually named something like backup 20181026082938.sqlite) HOWEVER this won’t include anything you did SINCE the upgrade so a database REPAIR (not Recreate) will likely be necessary.


Why you might want to downgrade

Some of the reasons you might want to downgrade to an earlier version
  • new feature doesn’t work as expected
  • orphaned (no longer supported in the GUI) old feature needs to be removed
  • performance changes

Why you might NOT want to downgrade

Some reasons you might NOT want to downgrade

Occasionally there are database or other changes that may cause a downgraded installation to not work correctly. Generally this can be address by re-updating to the previous version or doing additional downgrade steps such as:

  • manually updating the sqlite database to resolve issues such as database version errors

Also, be aware the if you are planning a temporary downgrade only (such as to resolve orphaned setting warnings) it’s probably best if you edit your jobs to disable any automatic scheduling. This makes sure a job doesn’t start up while you’re editing in the older version. Just be sure to re-enable the schedules when your done!


How to add versions you don’t already have in your updates folder

Here's how to add another version to your updates folder

Please note that these steps were tested on a Windows machine. If you try this on Linux or MacOS and it doesn’t work, please let us know.

If you find you want to downgrade to a version NEWER than what’s in your updates folder, you can MANUALLY “install” that update like this:

  1. Download the zip file version from the Releases · duplicati/duplicati · GitHub link
  2. Unzip it into a subfolder of your “updates” folder such as:
    a. ~/.config/Duplicati/updates/ for Linux user
    b. /root/.config/Duplicati/updates for Linux root
    c. C:\ProgramData\Duplicati\updates for Windows
  3. If necessary, rename the unziped subfolder to be JUST the version number of what you unziped. So if you downloaded duplicati-2.0.3.4_canary_2018-04-02.zip you’d name the folder 2.0.3.4 ending up with the acknowledgements.txt file at \Duplicati\updates\2.0.3.4\acknowledgements.txt
  4. Proceed with the normal “How to downgrade” process

This process can be useful if you find you’ve downgraded “too far” and Duplicati won’t start or you are finding errors in the \Duplicati\updates\Duplicati-crashlog.txt file.


How to downgrade

To downgrade / revert your Duplicati version:

  1. Use the main menu “About” -> “System info” Button to confirm your currently running version.

  2. Stop Duplicati tray-icon and service AS applicable. (On Windows you can use Ctrl-Shift-Esc to open the Task Manager then select the Services tab to get access to stopping / starting the Duplicati service. On MacOS you might want to try running something like sudo launchctl unload /Library/LaunchDamons/net.duplicati.server.plist or sudo launchctl unload /Library/LaunchAgents/net.duplicati.tray-icon.plist.)

  3. Go into your Duplicati updates folder and delete (or move it out of updates, a rename won’t work) any version folders newer than what you want to run:
    Windows
    a. C:\ProgramData\Duplicati\updates (most Windows service instances)
    b. C:\Users\<Duplicati user account>\AppData\Local\Duplicati\updates\ (most Windows user / tray-icon instances)
    Ubuntu Linux
    c. ~/.config/Duplicati/updates (most Linux user / tray-icon instances)
    d. /root/Duplicati/updates (most Linux root / daemon instances)
    e. /app/duplicati (most Linux Docker container instances)
    f. /usr/share/Duplicati (reported by at least one user as where it was)
    Debian Linux
    g. /usr/share/Duplicati/updates (Debian)
    h. /usr/local/share/Duplicati/updates (Debian)
    MacOS
    i. /Library/Application Support/Duplicati/updates (service / daemon on High Sierra 10.13.5)

  4. Start Duplicati.

  5. Use the main menu “About” -> “System info” Button to confirm you are no longer running the version from step 1.

Note: You can not downgrade lower than your “base version”. This is the version you installed with an actual installer (not via the GUI updater) and for later versions of Duplicati can be seen in the BaseVersionName line of the main “About” -> “System info” page.

If you want to go lower than your base version you will need to download and run the installer for an older version. This can usually be done “on top” of your current version, but if you choose to uninstall Duplicati first it would be safest for to export your backup jobs to text files so they can easily be re-added of the uninstall clears them out.


How Duplicati installs / updates work

Click here for the geeky details! :-)

When Duplicati is first installed it is put into the “base version” folder - basically where you’d expect an application to be installed.

When an update is installed through the GUI, it is downloaded into the updates folder.

When a part of Duplicati is run (from the “base version” folder) it checks the updates folder for anything newer and passes control to that newer version.

Note that there do seem to be some instances (such as certain command line calls) where running the “base version” does NOT seem to pass control to newer versions, which is why you may see some posts about people using the command line but seeing an older version (usually the “base version”) reported.


How to tell what version you installed / updated to

Click here for even more geeky details! ;-)

Because Duplicati handles GUI based updates through the updates folder as described above, looking at a version number using standard OS methods can cause confusion because only the base version is seen by the OS.

To know both your base version AND “execution version” you can go to the main menu “About” -> “System info” page and look at:

  • ServerVersionName (most recent update “execution version” being run)
  • BaseVersionName (manually installed “base version” not including any GUI updates, should match what’s reported by the OS)

Please note that this post is Wiki - if you see something incorrect or missing, feel free to fix or add it yourself by clicking the image button at the bottom right of this post! :slight_smile:


Stuck on Verifying Backend Data [2.0.3.6]
2.0.3.7 canary no support for Google Nearline anymore?
Recreate and repair the database automatically in case of backup failures
Release: 2.0.3.6 (canary) 2018-04-23
Release: 2.0.3.12 (canary) 2018-10-23
Backup failing due to unexpected difference in fileset
Activate downloaded upgrade sometimes fail
Updating via web interface vs installing .deb package
OnedriveV2 not available as provider choice
Revert to earlier version Open Media Vault
File PUT to Google Cloud Storge gives "(404) Not Found" error
Restore fails after upgrade to 2.0.3.3
Processing files which are not in backup sources
Upgrading Duplicati
After updating 2.0.4 duplicati does not boot into Linux Debian 8
Completely removing Duplicati for re-install
Downgraded Duplicati, now won't start
Choppy performance on QNAP running Duplicati 2.0.3.6
Latest release 2.0.4.3 (canary) seems "broken" on Windows 7 (Sorry, no offense!)
Update to 2.0.3.3_beta_2018-04-02 failed?
Version displaying bug
Version displaying bug
Think you're "Stuck" on "Verifying backend data"?
Slow local network and cloud backup
Update attempt trashed installation; please help me recover
Best Way to revert on Canary release tree?
Wasabi backup won't complete with 2.0.4.4
?auth-u automatically added to destination path
Updating to 2.0.4.5 from 2.0.3.3 from web interface didn't work
What does it mean to report a duplicate path
The database has version 8 but the largest supported version is 7
#2

Before I saw this post, I ended up going from 2.0.3.6 down to 2.0.3.5 on a Windows Server setup… it failed with errors the first attempt to install but it did clear out most of the mentioned files above, and then I ran the installer again and chose repair, after that all is good.


#3

I found on debian the updates folder could be located at either:
a. /usr/share/Duplicati/updates
or
b. /usr/local/share/Duplicati/updates


#4

Thanks for sharing!

I’ve added your findings to the original post but in case I got anything wrong feel free to fix it yourself as it’s actually a wiki so any user can edit it. :slight_smile:


#5

I saw that note, but couldn’t figure out how to edit it. Thanks for adding it! Hope it helps someone else like your post helped me! :slight_smile:


#6

I updated the post to include using the imagebutton for making changes. Hopefully it works that way for people who aren’t logged in as me. :slight_smile:


#8

I tried downgrading from 2.0.3.5 Canary down to 2.0.3.3 Beta. Then every time Duplicati server started, it would immediately crash with no error message. When run as a service it appears to be working, but the actual server isn’t running.

I tried running via command line and finally saw the error below. It would be nice if this showed up with the GUI or service. I deleted the file C:\Users\User\AppData\Local\Duplicati\Duplicati-server.sqlite and it now starts correctly. Note that this is a new PC I’m testing on with no existing backups so deleting database files isn’t an issue (in case that matters).

C:\Program Files\Duplicati 2>duplicati.server
A serious error occurred in Duplicati: System.Exception: Failed to create, open or upgrade the database.
Error message:
The database has version 5 but the largest supported version is 4.

This is likely caused by upgrading to a newer version and then downgrading.
If this is the case, there is likely a backup file of the previous database version in the folder C:\Users\User\AppData\Local\Duplicati.
_ at Duplicati.Server.Program.GetDatabaseConnection(Dictionary`2 commandlineOptions)_
_ at Duplicati.Server.Program.RealMain(String args)


#9

Yes, it would be nice but the errors are logged into the database so if Duplicati can’t get to the database then there is nowhere to log the error. :frowning:

I’m not sure why you got the error in the first place as I didn’t think there was a database version change between 2.0.3.3 and 2.0.3.6, but thanks posting it. I’ll update the main post to reflect that.


#10

https://github.com/duplicati/duplicati/tree/v2.0.3.4-2.0.3.4_canary_2018-04-02/Duplicati/Server/Database/Database%20schema is where the server database went to version 5, and I see that we’re now up to 6…

Although it’s not a great solution, sometimes these seemingly silent crashes leave a Duplicati-crashlog.txt although I’m not sure where they go. I’ll show the start of one that’s sitting in my Duplicati “updates” folder:

System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.Exception: A serious error occurred in Duplicati: System.Exception: Failed to create, open or upgrade the database.
Error message: 
The database has version 5 but the largest supported version is 4.

This is likely caused by upgrading to a newer version and then downgrading.
If this is the case, there is likely a backup file of the previous database version in the folder C:\ProgramData\Duplicati.

This shows how to get from 5 to 4, however downgrades unfortunately have to be tailored to their upgrades.


#11

Great info - and thanks for the link. I’ve updated the main post with all the database upgrade versions to date. :slight_smile:


#12

And more could be said, but there might be a shift in emphasis, maybe aimed primarily at those using Beta.

There’s now a recent safety recommendation to consider about how to do downgrades. While Canary users should be aware that Canary is a risk (even risky downgrades may help them), what should other users do? Canary moves in smaller quicker steps, so downgrade is easier, whereas a Beta-to-Beta downgrade is a lot.

Having this article provide steps for the recommendation below would be an approach. I’ve never been that comfortable with people editing databases manually, but there’s no programmed method - and no test suite. One reason for discomfort is that while structure changes are obvious, changed structure usages are not… Someday there might also be a big-time database redesign for performance, reliability, logging, whatever…

So here’s the conversation at Any progress in new beta? but I don’t know if “bulletproof” changed the reply:


2.0.2.9 fatal error
Unassociated Database Files?
Any progress in new beta?
#13

Thanks - steps to use the automatically created database backup have been added to the main post. :slight_smile:

@kenkendk, are these backups ever cleaned out? If not, we might want to let people know that every Duplicati update creates another copy of their database. I’ve heard of some people with 1-2G databases and that could add up over time…


#14

We should likely speak of “database” in the plural, which also begs the question of how to tell what was what, even to the extent of distinguishing former Duplicati-server.sqlite from former database for some backup job.

How to test which database belongs to which job? gets into this, but the solutions discussed are rather crude even before getting into Windows database encryption (I wonder if backups follow --unencrypted-database?).


?auth-u automatically added to destination path
#15

Nuts - you’re right, it’s unclear based on name alone whether the backup is for Duplicati-server.sqlite or [job].sqlite.