Can’t restore previous version of a file

Hi all,

I’ve got an .odt (Open Document Text) file that I’ve accidentally overwritten.

If I open it in the browser, I can see the previous versions of the file.

If I try to restore one of them, all looks fine in the browser, but the file on my machine just gets a red cross icon on it.

I can see that there’s a copy of the file that gets created, in the format … .name.odt.~23a9

I’ve tried copying that file to a different location, renaming and opening it. Unfortunately, LibreOffice just says that the file is corrupt. If it attempts to repair it, all that survives is the header and footer.

Is there anyway to restore a previous version of a file to a different file name? Or anything else that I can try?

I’m using a free Nextcloud service with

Nextcloud Desktop Client: 3.7.4
Operating system and version: Windows 10
Apache or nginx version: Not self hosting
PHP version: Not self hosting

Steps to replicate it:

  1. Create an Open Document file and let it sync.
  2. Change it a few times (syncing after each).
  3. Try to restore one of the previous versions.

The output of your Nextcloud log in: I don’t know where/how to find this, sorry.
The output of your config.php file in: Not self hosting
The output of your Apache/nginx/system log in: Not self hosting
Output errors in nextcloud.log in /var/www/ or as admin user in top right menu, filtering for errors. Use a pastebin service if necessary.: I’m not finding anything.

hello @DamianS welcome to the forum :handshake:

I can’t say a lot about… from my experience recovering old version could be tricky especially if you are not patient. One has to understand “restore previous version” action in NC web interface only performs this action on the server side… it takes time to sync this to the client… even this process might be not very stable… but once you restore older version on the server you have an option to download the file and save it locally with different name - I was always successful recovering old versions this way from my self-hosted NC instance.

Thanks for this, @wwe.
Unfortunately, when I try to download from the server, using the web interface, the download repeatedly fails.

Then the file must be in fact broken. last resort is to locate version files on the server storage and extract it there…