Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature Request - Backup current tabs to file #321

Open
ScottRFrost opened this issue Sep 11, 2019 · 3 comments
Open

Feature Request - Backup current tabs to file #321

ScottRFrost opened this issue Sep 11, 2019 · 3 comments

Comments

@ScottRFrost
Copy link
Contributor

If you go to Conex settings you get a nice option to import a TabGroups backup file, but I don't see a way to create a TabGroups backup file.

I'd like to blow away my whole firefox profile and start with a clean one, but I don't want to screw with reopening 150 tabs in the correct containers.

@kesselborn
Copy link
Owner

kesselborn commented Sep 16, 2019 via email

@ScottRFrost
Copy link
Contributor Author

I couldn't find anything either. There's lots of options for saving / syncing session, but none of them seem save the container.

@JibsouX
Copy link

JibsouX commented Jan 20, 2023

The same goes for me. I have tested I think all the session saving plugins, the one that manages to strangely put back the tabs with the containers is tab session manager, but if you change container or quit firefox, the tabs are lost, weard.
for now i simply backup the firefox profil folder..

#!/bin/bash

firefoxdir="$HOME/Library/Application Support/Firefox"
backupdir="$firefoxdir/Backups"
filebasename="Profiles_Backup-$(date "+%Y-%m-%d_at_%Hh-%Mmin-%Ssec")"
filebasedirectory="$backupdir/$filebasename"
profilesdir="$firefoxdir/Profiles"

mkdir -p "$backupdir"

(cd "$backupdir" && ls -tp | grep -v '/$' | tail -n +6 | tr '\n' '\0' | xargs -0 rm --)

pushd "$(dirname "$profilesdir")" >/dev/null
zip -rqX9Ty "$filebasedirectory.zip" "$(basename "$profilesdir")"
popd >/dev/null

it's simple and you can create a .sh script or .app with Automator (Screenshot).
If you want to run periodically add it to crontab,
or you can also add it like I did to the application that runs with the session login (preferences > users and groups > Login Items).

Explanation of the above script:

  1. Create a folder "Backups" in ~/Library/Application\ Support/Firefox
  2. Check if more than 5 files are already present and if needed delete the oldest backup file present in this folder (you can change the number of backup files that are kept by changing the cipher : "tail -n +6".
  3. Create a .zip file named Profiles_Backup.zip whith timestamp.

Maybe this addon can do a backup with container/account (i have not tested it for now) https://addons.mozilla.org/en-US/firefox/addon/containers-sync/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants