Retrieving 'bookmarks' etc, after new OS install.[SOLVED]

Hi again,

This relates to my other thread about my LinuxLite OS corrupting & only being able to get to command line on boot. I’m going to have to install a new OS.
I’m starting a new thread because it’s a specific question about browser ‘bookmark’ back ups. (NB I’m writing this on my spare/backup laptop.)

I’ve been able to back up my home directory files and am about ready to install Ubuntu 18 but I can’t find out how to backup my Firefox “bookmarks” or indeed find where they might be on the drive (if at all). I’ve looked on-line but all I can find is how to migrate them or back them up from the browser itself &, of course, can’t do that because I can’t launch the browser as I can’t boot to the GUI.

As I’ll be using the same hardware will Firefox still recognize that laptop as the same one & still show all my old ‘bookmarks’ ? Or will having a new OS prevent that?
If the latter am just going to have suck-it-up as a lost cause?

Finally - will I be in a similar position regarding YouTube notifications / followed channels etc. ?

Hello again.

If your Firefox was a fairly recent version (mine is v.78) then it should be easy using your live USB.
Navigate to /home/your-user-name/.mozilla/firefox/ (you must provide your own username) and you will see a directory (folder in windows-speak) like *******.default where the “***” will be a mixture of letters and numbers.
Double click on that to open the directory and you will see another directory called bookmarkbackups.
Double click on that to open it and you will see a list of the most recent automatic backups files in date order.
Copy the most recent one to your backup USB.

When you have installed Ubuntu 18, go through the same procedure to get to the bookmarksbackup directory and copy your file from your USB stick onto the computer.


I was looking for the .mozilla directory before & couldn’t find it. Using the icon route of the live USB default desktop does not display such a directory in home/ only the directories that used be ‘mine’ if you get me. These were also the only directories that displayed in ‘home’ when the OS/GUI was working, though occasionally these would not be displayed & would have, what I would call, system directories instead.

Whatever, there is no .mozilla directory showing in my ‘home’ folder now. There is one in usr/share but that only contains ‘extensions’ which itself is empty.

I have managed to open that drive in terminal and ls home/ but the same old directories are listed as per the icon route.

The only other directory (besides home) that has a sub-directory is ‘media’. Unfortunately this has a little box with ‘x’ in it (as does the ‘root’ directory)
& clicking that open shows ‘empty’ (as does ‘root’). This is the same little ‘x’ symbol that was on the files I couldn’t back up & I’m assuming it means I’m being denied access. When these type didn’t copy I was dialoged along the lines that ‘I wasn’t the owner & didn’t have permission’.

I get this sort of thing a lot when computers go wrong on me. Real puzzling.

P.S. Firefox regularly used to interrupt my web browsing claiming to have updated & would have to restart it to continue. I assume that this means it was a recent version.

I am sorry: I have failed once more to include all the information you need. A senior moment! :-[

Files beginning with a “.” are “hidden” files. They are generally system files that one doesn’t want to delete accidentally - hence they are hidden from casual view.
While you are in the home directory of the file manager (“Files”) do Ctrl+H and lots of hidden files (beginning with a dot) will appear. You will soon find .mozilla.
To hide the hidden files you just Ctrl+H again - it’s a toggling.


No worries. At least you’re trying to help - & getting there eventually :wink:

Ctrl+H works… but it doesn’t help.

Having found said Bookmarkbackup files as you instruct - they all have that nasty little ‘x’ on them. If I try to copy I get: Error while copying . And if I look at the details I get: Error opening file backup…etc : permission denied.

If I got to file properties to change permission I get: you are not the owner, so you can not changes these permissions.

End of the road here ?

End of the road? Not by a long chalk.
Please post the contents of the Bookmarks directory showing the "x"s so I can see it. I think I know what’s happening.

Like this? (if I’ve got how to attach picture that is.)

Thank you.
For other readers, the image was of File Manager displaying in icon mode with a cross over each file icon.

I can’t simulate this at home but I suggest the following test…

  1. Start a terminal session Ctrl+Alt+T (got it right this time!)
  2. Enter cd .mozilla/firefox/ntrc3s4e.default/bookmarkbackups. (check I’ve got the **.default right)
  3. Enter sudo ls l (where the “l” is lower case “L”). You will have to enter your computer password, which will not appear on the screen.

This should show a list of the backups with lots of extra information. If so, please copy and paste the output here.
To copy: highlight all the text (just like you do editing a document), then copy with Ctrl+Shift+C.

I’ll be back on line tomorrow night.

;D Hehe… Should not step 2. start cd home//… ? What you put didn’t work until I added that. Sudo ls l did not return a prompt for my password, just said “ls: cannot access ‘l’: No such file or directory”. ls on it’s own did give results but I don’t think this is anything more than previously.

I can’t copy & paste terminal output directly here as that’s on my other laptop. I had to save it as an odt file, copy to my ext.HDD then copy/paste it here.
Here it is:

ubuntu@ubuntu:/media/ubuntu/397b4fb2-bd3f-4194-be8c-04f46057dc03$ cd .mozilla/firefox/ntrc3s4e.default/bookmarkbackups
bash: cd: .mozilla/firefox/ntrc3s4e.default/bookmarkbackups: No such file or directory
ubuntu@ubuntu:/media/ubuntu/397b4fb2-bd3f-4194-be8c-04f46057dc03$ cd .mozilla/firefox/ntrc3s4e.default/bookmarkbackups.
bash: cd: .mozilla/firefox/ntrc3s4e.default/bookmarkbackups.: No such file or directory
ubuntu@ubuntu:/media/ubuntu/397b4fb2-bd3f-4194-be8c-04f46057dc03$ cd .mozilla/firefox/ntrc3s4e.default/bookmarkbackups/
bash: cd: .mozilla/firefox/ntrc3s4e.default/bookmarkbackups/: No such file or directory
ubuntu@ubuntu:/media/ubuntu/397b4fb2-bd3f-4194-be8c-04f46057dc03$ cd home/j**/.mozilla/firefox/ntrc3s4e.default/bookmarkbackups
ubuntu@ubuntu:/media/ubuntu/397b4fb2-bd3f-4194-be8c-04f46057dc03/home/j**/.mozilla/firefox/ntrc3s4e.default/bookmarkbackups$ sudo ls l
ls: cannot access ‘l’: No such file or directory
ubuntu@ubuntu:/media/ubuntu/397b4fb2-bd3f-4194-be8c-04f46057dc03/home/j**/.mozilla/firefox/ntrc3s4e.default/bookmarkbackups$ sudo ls
ubuntu@ubuntu:/media/ubuntu/397b4fb2-bd3f-4194-be8c-04f46057dc03/home/j**/.mozilla/firefox/ntrc3s4e.default/bookmarkbackups$ sudo ls l
ls: cannot access ‘l’: No such file or directory

" Should not step 2. start cd home//… ?" Yes - you are right. I forgot that we are not in the home directory of the PC. Well done.

Not sure why, if you are using the Live USB on the suspect PC, you can’t use Firefox and log in to this forum and paste the terminal output. I thought that was what you were doing, but it matters not.
And I have another apology: the command ls command is missing a “-” sign! Ah me. Perhaps I’ll get it right one day. That’s the problem with rushing.

sudo  ls -l

Options after a command always begin with a “-” sign.
The bookmark to back up is ‘bookmarks-2020-06-29_1014_5Wg+Gtu9QUIDsPtNSEhl8Q==.jsonlz4’, as you will have recognised.
Have we dealt with backing up your Thunderbird? I’ve lost track.


“Not sure why, if you are using the Live USB on the suspect PC, you can’t use Firefox and log in to this forum and paste the terminal output.” I originally didn’t want to connect to the net using the live USB on the sus.laptop as I knew I’d just have keep connecting to the router & entering the password every time switched on with the same for any forums etc log ins . Then just didn’t occur to me to do that for the terminal readout (as connecting had previously been ruled out & was thus a ‘sorted’ action. Brief insight into my autistic logic there).

For completeness here’s the readout from sudo ls -l (not that different to the ls result.) :

ubuntu@ubuntu:/media/ubuntu/397b4fb2-bd3f-4194-be8c-04f46057dc03$ cd home/jango/.mozilla/firefox/ntrc3s4e.default/bookmarkbackups
ubuntu@ubuntu:/media/ubuntu/397b4fb2-bd3f-4194-be8c-04f46057dc03/home/jango/.mozilla/firefox/ntrc3s4e.default/bookmarkbackups$ sudo ls -l
total 1784
-rw------- 1 1000 1000 116863 May 25 01:04 ‘bookmarks-2020-05-25_968_dI0wKDWyFtKLve+EFx1z6Q==.jsonlz4’
-rw------- 1 1000 1000 118019 May 27 23:25 ‘bookmarks-2020-05-28_979_zoqkQJfBSJ5OTecq8txQdA==.jsonlz4’
-rw------- 1 1000 1000 118418 May 31 16:58 ‘bookmarks-2020-06-02_981_82lYgTlMNEjKdpX5gNacLg==.jsonlz4’
-rw------- 1 1000 1000 118594 Jun 4 16:32 ‘bookmarks-2020-06-04_983_PG16mZJoP1KetEaOF-9+Xw==.jsonlz4’
-rw------- 1 1000 1000 119797 Jun 6 13:06 ‘bookmarks-2020-06-06_990_CVOuOfDKk-Tshy0GMPbeXA==.jsonlz4’
-rw------- 1 1000 1000 120236 Jun 7 09:12 ‘bookmarks-2020-06-07_994_X2lilIXHr0I-H8HGBuoKEg==.jsonlz4’
-rw------- 1 1000 1000 120532 Jun 7 23:46 ‘bookmarks-2020-06-08_997_RMLfdoTjjsI9G2JS6ZJLtg==.jsonlz4’
-rw------- 1 1000 1000 120772 Jun 10 11:14 ‘bookmarks-2020-06-10_1000_Swk9SKNq8rvhOTEgb80xSA==.jsonlz4’
-rw------- 1 1000 1000 121093 Jun 11 16:36 ‘bookmarks-2020-06-11_1003_knGrBDE4vOjzHZIFKVo99w==.jsonlz4’
-rw------- 1 1000 1000 121351 Jun 12 23:18 ‘bookmarks-2020-06-13_1005_PvyG9eaQwtiIpIDL0Jyyig==.jsonlz4’
-rw------- 1 1000 1000 121482 Jun 14 22:31 ‘bookmarks-2020-06-14_1007_caLhS-v8SNpzEREjYsmD9w==.jsonlz4’
-rw------- 1 1000 1000 121612 Jun 14 23:00 ‘bookmarks-2020-06-15_1008_T4CZSjBnNJEUdF3QUwR9zg==.jsonlz4’
-rw------- 1 1000 1000 121912 Jun 18 17:06 ‘bookmarks-2020-06-25_1009_IXv9CuTmNW7EdYkXzCX58g==.jsonlz4’
-rw------- 1 1000 1000 122347 Jun 27 23:40 ‘bookmarks-2020-06-28_1012_6JVT-y65HO6LuCt1s8uqgw==.jsonlz4’
-rw------- 1 1000 1000 122596 Jun 29 15:51 ‘bookmarks-2020-06-29_1014_5Wg+Gtu9QUIDsPtNSEhl8Q==.jsonlz4’

Just checking here - to back this up directly to my external HDD, having got to the bookmarkbackups directory, my command should be :

cp ‘bookmarks-2020-06-29_1014_5Wg+Gtu9QUIDsPtNSEhl8Q==.jsonlz4’/media//

(bookmarks file retains the ’ ’ marks ?)

or should I be using the rsync command to mentioned in my other thread?

Not mentioned Thunderbird so far, but as I have never used it I don’t think this is a problem. (I intend to start using it once all this is sorted.)
I did mention YouTube subscriptions though. Anything I might need to/can do about that ?

OK, I understand.

I’m confident that you don’t need the quotation marks. They are generally needed only if there are spaces in a file name. Leaving them in won’t make any difference.
Make sure that there is a space between the file name and your /media… and don’t forget the -a option:
cp -a ‘bookmarks-2020-06-29_1014_5Wg+Gtu9QUIDsPtNSEhl8Q==.jsonlz4’ /media///

In this particular case, cp -a works the same as rsync -a but the rsync command is better when one is doing regular backups of whole directories as it checks to see if individual files have been changed since the last backup and skips them (leaving the unmodified backup in place) without complaining that it’s already there on the backup. And this speeds things up a lot.

Re Youtube subscriptions: I guess that this is independent of your computer except that as the “cookies” will be lost you will have to log in again to re-create the cookie (if you allow that).



  1. I’ve just checked with an Ubuntu18 live USB: if you double click on the ‘bookmarks-2020-06-29_1014_5Wg+Gtu9QUIDsPtNSEhl8Q==.jsonlz4’ to highlight and copy it only the bit between the apostrophes gets copied - so that’s OK.
  2. When in terminal mode, I discovered that in order to access the hidden files I had to log in as root by:
sudo -i

so I suggest that you do that, too. Sorry you had all that trouble.
3. I couldn’t get a wireless connection with the Live USB (even though my router was visible) and had to use an Ethernet cable. How about you?

I can get wireless connection OK but it looks like I have to create a new firefox/mozilla account after every shut down. If I just close the laptop’s lid (for suspend?) as I used to do then it starts again without a boot fine & I can connect direct to firefox as normal, so I’m leaving it like that for the mo.
I’ve also had some problems with the live USB mounting & unmounting as a normal USB stick/drive. Applications, like libreoffice, will not work when it’s like this & it does not shut down properly & I have to ctrl-alt-del to restart then shut down again. Works OK on reboot. Only started doing this once I logged into terminal as root.

None of anything we set out to do seems to work. I’ve been at it now near 2hrs & I’m just too tired to do any more or explain things. I’ll try again tomorrow & let you know then.

Success ! !!!

Transcript of terminal session ( having cd 'ed to home/etc ):

ubuntu@ubuntu:/media/ubuntu/397b4fb2-bd3f-4194-be8c-04f46057dc03/home/j***/.mozilla/firefox/ntrc3s4e.default/bookmarkbackups$ cp -a bookmarks-2020-06-29_1014_5Wg+Gtu9QUIDsPtNSEhl8Q==.jsonlz4 /media/j***/E6687FC2687F9053/
cp: cannot open ‘bookmarks-2020-06-29_1014_5Wg+Gtu9QUIDsPtNSEhl8Q==.jsonlz4’ for reading: Permission denied
ubuntu@ubuntu:/media/ubuntu/397b4fb2-bd3f-4194-be8c-04f46057dc03/home/j***/.mozilla/firefox/ntrc3s4e.default/bookmarkbackups$ sudo -i
root@ubuntu:~# cp -a bookmarks-2020-06-29_1014_5Wg+Gtu9QUIDsPtNSEhl8Q==.jsonlz4 /media/j***/E6687FC2687F9053/
cp: cannot stat ‘bookmarks-2020-06-29_1014_5Wg+Gtu9QUIDsPtNSEhl8Q==.jsonlz4’: No such file or directory
root@ubuntu:~# cd home/j***/.mozilla/firefox/ntrc3s4e.default/bookmarkbackups
-bash: cd: home/j***/.mozilla/firefox/ntrc3s4e.default/bookmarkbackups: No such file or directory
root@ubuntu:~# exit
ubuntu@ubuntu:/media/ubuntu/397b4fb2-bd3f-4194-be8c-04f46057dc03/home/j***/.mozilla/firefox/ntrc3s4e.default/bookmarkbackups$ sudo cp -a bookmarks-2020-06-29_1014_5Wg+Gtu9QUIDsPtNSEhl8Q==.jsonlz4 /media/j***/E6687FC2687F9053/
cp: cannot create regular file ‘/media/j***/E6687FC2687F9053/’: No such file or directory
ubuntu@ubuntu:/media/ubuntu/397b4fb2-bd3f-4194-be8c-04f46057dc03/home/j***/.mozilla/firefox/ntrc3s4e.default/bookmarkbackups$ df | grep media
/dev/sda1 472443160 80913728 367507672 19% /media/ubuntu/397b4fb2-bd3f-4194-be8c-04f46057dc03
/dev/sdc1 156288320 64940580 91347740 42% /media/ubuntu/E6687FC2687F9053
ubuntu@ubuntu:/media/ubuntu/397b4fb2-bd3f-4194-be8c-04f46057dc03/home/j***/.mozilla/firefox/ntrc3s4e.default/bookmarkbackups$ sudo cp -a bookmarks-2020-06-29_1014_5Wg+Gtu9QUIDsPtNSEhl8Q==.jsonlz4 /media/ubuntu/E6687FC2687F9053
{ I checked in the external HDD & it was there!}

So going to root didn’t work but using sudo did - once I’d got the destination drive’s full address correct using df | grep media that you told me of in my other thread. ( I’ve even found where the ’ | ’ key is on the US keyboard layout ). Sure helps to have some juice in the mental energy dept!

Few - at last. I bet you’re glad too. Don’t have to deal with me anymore :slight_smile:

THANK YOU. Now I can start looking at installing Ubuntu permanently. (Will I need to start another thread ?! )

Your attempt to copy the bookmarks whilst in root didn’t work because you didn’t cd correctly to the bookmarks directory whilst in root. But you succeeded and that’s the point.
I made an edit to my previous post about changing the k/b layout, but you found the symbol, so fine.

Installing Ubuntu? I doubt you’ll need any advice on that: just click on the “Install Ubuntu” icon on the desktop and away you go. When you are given a choice about overwriting the existing O/S, say “yes”. You’ll need to sit with it for an hour or so as you have to supply some info occasionally.

Well done, RB - and I am sorry for confusing you with my errors and omissions.


Hi RB.

If everything is satisfactory would you please mark all your three or four topics as solved?
Thank you.


Will do.
Install done & working well (touch wood). Backups restored too.

Excellent news!