Recover old profile not saved

Is it possible to restore or recover the macros of the old user profile (in case there are no copies of either the macros or the old user profile) once the user profile has been reset to the factory level?
Libreoffice 6.02-ubuntu 16.04

If you have not saved your old user profile, it becomes problematic.

In the following description you can see where the user profile should be on your PC:
LibreOffice user profile

Try searching for an old user profile with your file manager if you are not sure if it exists.


In addition:

Backing up the user profile at regular intervals

1 Like

Meanwhile, thanks for the reply.
I have already checked the folder used by ubuntu to store the profile (home / username / .config / libreoffice / 4 / user /)
And it has clearly been overwritten.
I had not made copies of the profile in the past (unfortunately).
The macro modules (all of the standard library) are text files with the .xba extension
Since there was no recycle bin, I tried (and am still trying) with disk scanning software (at this moment the ā€˜testdiskā€™ application) looking for entries in the fat with the extension .xba, hoping to recover something (I think it is the only way)
I scanned the entire disk (including system folders) with the ubuntu file manager for .xba files, but found nothing

Too bad you have not found anything more.
Creating backups (even of other files) is always a good idea.
I wish you good luck anyway.

1 Like

I know, I was about to migrate to version 7.03, never had any problems and kept postponing.
It was enough for me to restore the factory interfaces only (the extensions no longer worked, the changes in safe mode had not solved the problem), but in the hurry I didnā€™t think about the macros.

Serve me as a lesson. :unamused:

Thank you :slightly_smiling_face:

1 Like

I start to give a solution, I will update later.
I have already recovered about 90% of the macros in question, maybe more, the recovery is still in progress.
I state that my PC uses a mechanical hard drive, not an SSD.
I donā€™t know if this solution would work under ssd
As I thought, after the account reset the previous content is deleted, but the data, all in the linux partition, are still there as deleted files.
It is therefore a data recovery problem.
I used an old but powerful recovery software, ā€œphotorecā€, but I think other similar software will work
For haste and inexperience (Iā€™m not a system engineer) I worked in the worst conditions, starting photorec under root from the linux partition, and then with the OS working on the disk at the same time, modifying its content
The best thing would have been, for the more experienced, clone the disk on an external SSD (essential for subsequent processing), restart from DVD / USB (for those who have an operating system on DVD or key) or, if the PC has a bootable double partition with two Operating Systems, reboot on the other system and scan from this the partition on which there is the data to be recovered
I scanned ALL LINUX PARTITION (small size, 80Gb, I have the rest of the disk partitioned)

About 450,000 files have been downloaded onto the SSD, divided into folders of 500 files
Photorec changes filenames, usually leaving the extension unchanged
Each file containing a complete macro module is saved with the extension .xml (being in fact xml)
The fragments of each of these files are saved in file.txt
From the terminal, using the grep command appropriately, I searched repeatedly in all the txt and xml files for any useful known string (e.g. the names of the modules in the xml header, or the declarations of known functions)
The better you know how to use the ā€œgrepā€ shell command (what you need using the internet you learn quickly, I had never used it) more effective and targeted is the search (it must be recursive, starting from the root of the folders saved on the ssd .
Of almost all the modules I managed to save everything, of some are some fragments that, put together, have in any case recovered the bulk of the content.
Only one or two modules, for now, I havenā€™t found anything
It takes a lot of patience to put the module snippets together
I created a folder for each module, saving the files found at each search, using a calc spreadsheet to record all the operations working with an internal database (very useful for filtering the results of each module, sorting according to the size of the files found)
I hope this solution can help those who find themselves in this situation
Of course it should only be used if the loss is important, in my case there were two years of work ā€¦

UPDATE 2022-07-13
I recovered and rebuilt 95% of the entire library, loading it into the IDE, compiling and testing it.
Almost all modules were recovered intact as .xml
Three modules (unfortunately important) recovered in fragments distributed in many .txt files (even 10) and put back together almost completely.
It went well. I confirm that using a recovery sw correctly on the entire OS partition these problems can be, at least partially or completely solvable
From today, systematic backups of the profile !!!

1 Like