Ask Your Question
0

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

asked 2021-04-18 14:38:35 +0200

sistemo2021 gravatar image

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

edit retag flag offensive close merge delete

2 Answers

Sort by » oldest newest most voted
0

answered 2021-04-19 01:33:41 +0200

sistemo2021 gravatar image

updated 2021-04-19 01:36:46 +0200

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.

edit flag offensive delete link more
0

answered 2021-04-18 15:17:18 +0200

erAck gravatar image

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.

edit flag offensive delete link more

Comments

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.

sistemo2021 gravatar imagesistemo2021 ( 2021-04-19 01:26:56 +0200 )edit
Login/Signup to Answer

Question Tools

2 followers

Stats

Asked: 2021-04-18 14:38:35 +0200

Seen: 31 times

Last updated: Apr 19