Is it possible to recover (unzip) from "*.pack" files?

In “.config/libreoffice/4/user/pack/” directory there are “*.pack” files that appear to be backup copies of templates, basic modules, databases etc. Is it possible to unpack them manually or with some macro command?

I want to recover a deleted basic module (Module1) containing important basic macro and the only place where I’ve found a copy of the module is “pack” folder (I’ve copied this folder before closing LO, while Module1.xba dissipated form .config/libreoffice/4/user/basic/Standard/ simultaneously with deletion). But I can’t find a way to convert “Module1.pack” (full path: .config/libreoffice/4/user/pack/basic/Standard/Module1.pack) file into something like Module1.xba or Module1.bas.

Double clicking on “Module1.pack” returns Error Message “There is no applications installed for pack200 Java archive files”. Renaming into Module1.zip and running in terminal “unzip Module1.zip” does not work as well.

Also I’ve tried “unpack200” utility, it returns the following:

$ unpack200 Module1.pack myfile.jar

Warning: The unpack200 tool is deprecated, and is planned for removal in a future JDK release.

Corrupted pack file: magic/ver = 5041434B/0.0 should be CAFED00D/150.7 OR CAFED00D/160.1 OR CAFED00D/170.1 OR CAFED00D/171.0

LO 6.4.7.2 on Ubuntu 20.04, LO 7 under Windows 8

Those user/pack/**/*.pack files are in an internal versioned backup format not usable with unpack or unzip or something similar. They’re used when you restart in SafeMode (from the Help menu or command line --safe-mode option) and select Restore from backup. I’m not sure at what stage the basic/Standard/Module1.pack would be applied, apparently it’s part of the configuration restore.

A better bet might be restoring user/basic/Standard/Module1.xba from a recent actual backup.

Brilliantly, thanks a lot for your suggestion! Restart worked for me! After restarting in safe mode LO recovered my macro from pack file. Actually next steps were needed to recover from “Module1.pack”, I would place them as an answer for now.

Next steps worked for me to recover “Module1” from “Standard” library (given that Module1.pack file was backed up and copied in some place before from pack folder) - Thanks to erAck for suggestion about safe mode:

  1. Create a new blank Module1 in macro
    organizer in appropriate library, in
    my case “Standard” (may be it’s not
    necessary)

  2. Copy (replace) reserved
    “Module1.pack” file back
    into “.config/libreoffice/4/user/pack/basic/Standard/”
    (LO still opened)

  3. Restart LO in safe mode

  4. On restart check first flags to
    recover

Module1 now should be recovered.