Tue. Dec 7th, 2021


In case you’ve ever misplaced your entire pinned and open tabs in Firefox, you know the way irritating it may be. Jack Wallen reveals you the way he backs up his session to get well tabs from the earlier occasion.

firefoxhero.jpg

Picture: Mozilla

Here is how my Firefox net browser workflow goes.

Every morning, after I’m prepared to start out my first writing session, I log into my desktop PC and launch Firefox. When the browser opens, it begins at my earlier session (with all of my pinned tabs and different tabs I might need had open for analysis). I write and I write and I write. That goes on all through the day. When it comes time to show the lights out in my workplace, I shut Firefox (as a result of I take advantage of the Nightly launch and need to apply the newest additions upon beginning the following morning) and say goodnight. 

SEE: Guidelines: Server stock (TechRepublic Premium)

The following day, I begin it over again.

That workflow hardly ever fails me.

However every so often, it does. You see, I’ve Firefox set to Restore earlier session (in Settings), so it all the time picks up the place I left off. That is the place it may turn out to be problematic. As an instance, for instance, I neglect that I had a second Firefox window open with a single tab. If I do not shut that secondary window first after I reopen Firefox the following day, it’s going to bear in mind no matter state it was in when it was final closed. If I shut that single window final … you see the place that is going.

So what do I do?

One technique to keep away from such frustration is to frequently again up a particular listing which homes the session state. It isn’t 100% foolproof, however it has helped me prior to now. 

I will present you easy methods to do exactly that. I will be demonstrating on Linux, however this may be performed on macOS and Home windows as properly (you simply have to regulate the directories and instruments used).

What you will want

The one factor you will want is a working occasion of Firefox. That is it. Let’s get to work.

Find out how to find your Firefox profile listing

The very first thing we should do is find our Firefox profile listing. To do that, open Firefox and sort about:assist within the tackle bar. Within the ensuing window (Determine A), search for the road Profile Listing.

Determine A

firefoxrecovera.jpg

This web page provides you extra details about Firefox than you in all probability ever wanted.

Your Profile Listing can be in /dwelling/USER/.mozilla/firefox/STRING.default

The place USER is your Linux username and STRING is a random string of characters.

Copy that full path.

Find out how to create the backup in Firefox

What we’ll do is use cron to create a each day backup that may happen earlier than Firefox is closed on the finish of the day. Say, as an example, you shut Firefox at 10 p.m. We’ll run the backup at 9 p.m. (that manner we all know we’re saving all of our open tabs).

We will create a script that may run the backup after which create a cron job that may run the script each evening at 9 p.m.

Create the script with the command:

nano firefoxbackup.sh

In that script add the next:

#!/bin/bash

BDIR="/dwelling/USER/.mozilla/firefox/STRING.default/sessionstore-backups"
BLOC="/dwelling/USER/Paperwork"

tar -czvf $BLOC/firefoxbackup.tar.gz $BDIR

The place USER Is your Linux username and STRING is the random string of characters to your Firefox profile listing.

Save and shut the file.

Give the file executable permissions with:

chmod u+x firefoxbackup.sh

Take a look at the file to ensure it really works with:

./firefoxbackup.sh

After it completes, it’s best to see the file firefoxbackup.tar.gz in your ~/Paperwork listing. 

Find out how to create the cron job in Firefox

Now we’ll create the cron job. Open the crontab editor with:

crontab -e

On the backside of that file, we’ll add:

0 21 * * * /dwelling/USER/firefoxbackup.sh >/dev/null 2>&1

You possibly can change the situation of the backupscript to be the place you favor. Simply be sure that, in the event you change the situation of the script, that change is mirrored within the cronjob.

Now, at 9 p.m. each evening, your sessionstore-backups listing (the listing that really homes the knowledge to your classes) can be backed as much as ~/Paperwork. Ought to something go improper that day, you may restore Firefox to the earlier evening’s session and reclaim all of these open tabs.

No, this would possibly not restore the tabs you might have open in the intervening time the issue happens, however it’s going to prevent from having to reopen and re-pin all of these tabs. This little trick has saved me a superb period of time on a couple of events. Set it up and hope you by no means must rely upon the backup.

Additionally see



Source link

By admin

Leave a Reply

Your email address will not be published. Required fields are marked *