Jump to content

Firefox Containers and Container Tabs


NewTricks

Recommended Posts

These have been available for maybe 5 months now. ZDNet explains their function and use here What Are Firefox Container Tabs. I've given it a trial run. Is the time and effort to set up these containers worth it?

As I understand it now, the main point is to compartmentalize  cookies etc for similar sites, to avoid having them all in a group. When a bunch of cookies are together, they "share" information in ways which the user may not want. I assume this means trackers. The "cookie jar" contents ,which may contain a couple hours of web browsing, are then mixed and matched to compile an  increasingly accurate profile of the user.

Other things I've read say that Firefox already contains features which are built in, so you don't need this. With new Firefox versions coming out regularly, are these already outdated?

Is this hype, an effort to convince people they actually have more control that they do, or legitimate? Am I missing something, if so, what is it?

 

Link to post
Share on other sites

  • Root Admin

Firefox Containers have been around a long time and I've been using them. Though they've had different names in the past

As you can see they've had others for a while too

image.png

 

Multi-Account Containers
https://support.mozilla.org/en-US/kb/containers

Firefox Multi-Account Containers
https://addons.mozilla.org/en-US/firefox/addon/multi-account-containers/

 

It is an excellent way to compartmentalize sites from each other but can also be a bit advanced for to get used to.

One major caveat to remember is NEVER disable the extension like you do others. Unless Firefox has fixed it, all of your customization will be deleted and it doesn't keep a backup of it.

So, one needs to ensure they have a backup of the Firefox file for Containers or the entire profile

 

  • Thanks 1
Link to post
Share on other sites

Well, turns out I've been missing quite a lot! 🙃 When you say "long time"-how long? 

The links are really helpful and give me a better starting point. It is as complex as it first appeared, so at least that perception was accurate. 

Why would anyone disable that extention? Or any extension? 

After a Firefox Container file, or profile is created, where should a backup be saved? Along with a complete back up of the hard drive or someplace else? 

Link to post
Share on other sites

 

15 minutes ago, AdvancedSetup said:

I actually broke Firefox yesterday

I'm beginning to understand what this means....I'm sorry you had a problem.

Two questions:
1. I regularly clear my history manually. Will this clear or disable my container settings, or would the Never Remember History have to be on?

[Note: Containers are disabled in Private Browsing windows and when Never Remember History is selected in your privacy settings.]

2. What I want appears below.

What I get on a right click:, Open in new tab, Open in new container tab, open in new window, open in new private window, (then edit bookmark etc) the very last choice is open bookmark in container tab.

right click menu options.jpg

Link to post
Share on other sites

  • Root Admin

I'm not sure what is going on. Once I start to load up my Containers again I keep getting a lock up in Firefox. I'm going to have to spend some time and try to dig into this soon I suppose.

As far as I know there should not be an issue as I clean often too with no real issues. It has no affect on the Containers that I can determine.

Not sure if there is a question in #2 if there is I'm not sure what the question is.

 

Link to post
Share on other sites

8 minutes ago, AdvancedSetup said:

I clean often too with no real issues

good! That was the main thing.

regarding question at #2. I want to see all the choices illustrated in the screenshot, but that may be inconsequential at this point. I'll forget about this for now.

 

15 minutes ago, AdvancedSetup said:

I'm going to have to spend some time and try to dig into this soon I suppose.

You'll figure it out.

Link to post
Share on other sites

  • Root Admin

Start Firefox

Click on the Help menu, then More Troubleshooting Information

Then find "Profile Folder" and three should be a small button to "open folder" - click that button.

That should open a folder like this:  C:\Users\<user name>\AppData\Roaming\Mozilla\Firefox\Profiles\

Now exit out of Firefox and in the Windows file manager go up a couple folders so you're at the this level:  C:\Users\<user name>\AppData\Roaming\Mozilla\


From there you right-click and using 7-Zip chose "add to Firefox.zip

Then rename that backup firefox.zip anything you want and save it to a backup folder based on date

Inside your profile is the file:  containers.json

That file has all your containers setup in it.

 

There are other ways to do and we could even automate a batch file if you wanted.

 

  • Thanks 1
Link to post
Share on other sites

9 hours ago, AdvancedSetup said:

in the Windows file manager go up a couple folders so you're at the this level:  C:\Users\<user name>\AppData\Roaming\Mozilla\

Theoretically, I know what you mean and I can envision it. In reality, looking for a couple screenshots to get there.  I know the attached is not the location you mean,  only proof that I've tried.

9 hours ago, AdvancedSetup said:

save it to a backup folder based on date

As I add to my containers and tabs, this list will change. Should I delete and replace the last backup or save a couple dates for overlap?

Thanks for your patience @AdvancedSetup

Pofiles.jpg

Link to post
Share on other sites

  • Root Admin

Hello @NewTricks

Here is a commented batch file for backing up Mozilla Firefox to a D: drive. You could back it up to another folder on your C: drive such as C:\BACKUP\Firefox_Backup though if wanted, but a true backup should be on another drive.

Use TSCopy to perform a full backup of Mozilla Firefox even if program is in use
 https://www.trustedsec.com/blog/access-locked-files-with-tscopy/
 https://github.com/trustedsec/tscopy
We are also using 7-Zip as the archiver to help do this work
https://www.7-zip.org/

 

image.png

 

Once the batch file is setup for your environment simply run it with Admin rights and it should backup Firefox

image.png

 

image.png

image.png

 

@Echo Off

:: Use TSCopy to perform a full backup of Mozilla Firefox even if program is in use
:: https://www.trustedsec.com/blog/access-locked-files-with-tscopy/
:: https://github.com/trustedsec/tscopy
:: We are also using 7-Zip as the archiver to help do this work
:: https://www.7-zip.org/

:: The following code will detect the current date and time and make available 
:: to create a folder based on the date and time
Set /A "Jan=1,Feb=2,Mar=3,Apr=4,May=5,Jun=6,Jul=7,Aug=8,Sep=9,Oct=10,Nov=11,Dec=12"
Set /A "Mon=1,Tue=2,Wed=3,Thu=4,Fri=5,Sat=6,Sun=7"
Type Nul >"%TEMP%\~.ddf"
Makecab /D RptFileName="%TEMP%\~.rpt" /D InfFileName=Nul /F "%TEMP%\~.ddf" >Nul
Set /P "timestamp=" <"%TEMP%\~.rpt"
For /F "tokens=3-9 delims=: " %%a In ("%timestamp%") Do (
Set /A "year=%%g,month=%%b,day=1%%c-100,weekday=%%a"
Set /A "hour=1%%d-100,minute=1%%e-100,second=1%%f-100"
)
Del /Q "%TEMP%\~.*"
Set newdir=%year%-%month%-%day%

@ECHO off
SETLOCAL ENABLEEXTENSIONS
for /f "tokens=1-4 delims=:,.-/ " %%i in ('echo %time%') do (
set 'hh'=%%i
set 'mm'=%%j
set 'ss'=%%k
set 'ff'=%%l)
ENDLOCAL & SET v_Hour=%'hh'%& SET v_Minute=%'mm'%& SET v_Second=%'ss'%& SET v_Fraction=%'ff'%
set timestring=%V_Hour%%V_Minute%%v_Second%.%v_Fraction%
Set newdir=%newdir%_%timestring%


:: Make our new folder based on NEWDIR date and time the backup was run
:: (we will assume your backup drive is the D: drive. If not then you need to modify to your drive settings)
MD "D:\Backup\Firefox_Backup\%newdir%"
:: I keep utility files in my D:\Backup\Admin folder structure. Adjust where you keep the TScopy_x64.exe file 
:: Here we add the AppData folders for Mozilla to back them up (if you're using Thunderbird you'd probably want to add a bit more work to back that up too)
D:\Backup\Admin\batch\TScopy_x64.exe -r -o "D:\Backup\Firefox_Backup\%newdir%" -f "C:\Users\PC\AppData\Local\Mozilla\*"
D:\Backup\Admin\batch\TScopy_x64.exe -r -o "D:\Backup\Firefox_Backup\%newdir%" -f "C:\Users\PC\AppData\Roaming\Mozilla\*"
D:\Backup\Admin\batch\TScopy_x64.exe -r -o "D:\Backup\Firefox_Backup\%newdir%" -f "C:\Program Files\Mozilla Firefox\*"
D:\Backup\Admin\batch\TScopy_x64.exe -r -o "D:\Backup\Firefox_Backup\%newdir%" -f "C:\ProgramData\Mozilla*"
D:\Backup\Admin\batch\TScopy_x64.exe -r -o "D:\Backup\Firefox_Backup\%newdir%" -f "C:\Windows\System32\Tasks\Mozilla"

:: Export the HKCU and HKLM keys of Mozilla to a saved registry file 
:: There are way too many registry entries all over the registry to do a full backup without creating a custom list to export
:: The main HKLM and HKCU will contain the majority of settings. 
:: These backups are not meant to replace the Firefox installer but to keep backups of your customizations of Firefox
reg export "HKEY_CURRENT_USER\SOFTWARE\Mozilla" "D:\Backup\Firefox_Backup\%newdir%\hkcu_mozilla.reg" /y
reg export "HKEY_LOCAL_MACHINE\SOFTWARE\Mozilla" "D:\Backup\Firefox_Backup\%newdir%\hklm_mozilla.reg" /y

::Remove the pickle file from the Python script run as we don't need it 
DEL "D:\Backup\Firefox_Backup\%newdir%\mft.pickle"

:: Create the 7z archive file of Mozilla based on date and time the backup was run
"C:\Program Files\7-Zip\7z.exe" a "D:\Backup\Firefox_Backup\%newdir%\%newdir%_firefoxbackup.7z" "D:\Backup\Firefox_Backup\%newdir%"
:: Now that all has been backed up delete all the folders and files used as part of the backup
CD /D D:\Backup\Firefox_Backup\%newdir%
RD /S /Q "D:\Backup\Firefox_Backup\%newdir%\programdata"
RD /S /Q "D:\Backup\Firefox_Backup\%newdir%\Windows"
RD /S /Q "D:\Backup\Firefox_Backup\%newdir%\users"
del D:\Backup\Firefox_Backup\%newdir%\*.reg
:EOF
:: Once satisfied the backup is working properly remove the pause and consider setting up a weekly or monthly scheduled task.
pause

 

Here is the batch file in .txt but you just change the extension to .bat

Backup_Firefox.txt

 

Cheers

 

 

Edited by AdvancedSetup
Updated information
  • Confused 1
Link to post
Share on other sites

  • Root Admin

The method above will allow you to backup Firefox even with it open and you using it.

Most other methods will not allow you to copy, move, or edit certain files with Firefox open.

Then once you start to learn using the TSCopy program you can also back up your Registry system hive files.

 

@Echo Off
:: Use TSCopy to perform a full backup of Mozilla Firefox even if program is in use
:: https://www.trustedsec.com/blog/access-locked-files-with-tscopy/
:: https://github.com/trustedsec/tscopy
:: We are also using 7-Zip as the archiver to help do this work
:: https://www.7-zip.org/
Set /A "Jan=1,Feb=2,Mar=3,Apr=4,May=5,Jun=6,Jul=7,Aug=8,Sep=9,Oct=10,Nov=11,Dec=12"
Set /A "Mon=1,Tue=2,Wed=3,Thu=4,Fri=5,Sat=6,Sun=7"
Type Nul >"%TEMP%\~.ddf"
Makecab /D RptFileName="%TEMP%\~.rpt" /D InfFileName=Nul /F "%TEMP%\~.ddf" >Nul
Set /P "timestamp=" <"%TEMP%\~.rpt"
For /F "tokens=3-9 delims=: " %%a In ("%timestamp%") Do (
Set /A "year=%%g,month=%%b,day=1%%c-100,weekday=%%a"
Set /A "hour=1%%d-100,minute=1%%e-100,second=1%%f-100"
)
Del /Q "%TEMP%\~.*"
Set newdir=%year%-%month%-%day%

@ECHO off
SETLOCAL ENABLEEXTENSIONS
for /f "tokens=1-4 delims=:,.-/ " %%i in ('echo %time%') do (
set 'hh'=%%i
set 'mm'=%%j
set 'ss'=%%k
set 'ff'=%%l)
ENDLOCAL & SET v_Hour=%'hh'%& SET v_Minute=%'mm'%& SET v_Second=%'ss'%& SET v_Fraction=%'ff'%
set timestring=%V_Hour%%V_Minute%%v_Second%.%v_Fraction%
Set newdir=%newdir%_%timestring%

MD "D:\Backup-Hives\%newdir%"
D:\Backup\Admin\batch\TScopy_x64.exe -r -o "D:\Backup\Hives\%newdir%" -f c:\users\*\ntuser*,c:\Windows\system32\config
:: Remove the Default profile hive before creating 7z archive
CD /D D:\Backup\Hives\%newdir%
del "D:\Backup\Hives\%newdir%\mft.pickle" /f
RD /q /s "D:\Backup\Hives\%newdir%\Users\Default"
:: Create the 7z archive file 
"C:\Program Files\7-Zip\7z.exe" a "D:\Backup\Hives\%newdir%\%newdir%_hivebackup.7z" "D:\Backup\Hives\%newdir%\"
:: Remove the physical file and folder data to reduce disk usage now that we have the 7z archive
RD /q /s "D:\Backup\Hives\%newdir%\Users"
RD /q /s "D:\Backup\Hives\%newdir%\windows"
:EOF

PAUSE

 

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
Back to top
×
×
  • Create New...

Important Information

This site uses cookies - We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.