kesselborn / conex

Firefox extension
Mozilla Public License 2.0
173 stars 16 forks source link

Feature Request - Backup current tabs to file #321

Open ScottRFrost opened 4 years ago

ScottRFrost commented 4 years ago

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 commented 4 years ago

Yeah, I know. Even I have the same problem at the moment but no time to implement a solution. It should be a dedicated Add-On: if you find a Session-Solution, which exports the Session with Container information, Conex should just work out of the box, as it does not keep any State. Unfortunately, there is no such Add-On at the moment as far as I know — sorry.

Cheers, Daniel

On 11. Sep 2019, at 19:26, Scott R. Frost notifications@github.com wrote:

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.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/kesselborn/conex/issues/321?email_source=notifications&email_token=AAAC7DLGLGRWFV75U7OMAR3QJES5ZA5CNFSM4IVWYFGKYY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4HKY6LMA, or mute the thread https://github.com/notifications/unsubscribe-auth/AAAC7DPUG4MBUBHRXUMXZQ3QJES5ZANCNFSM4IVWYFGA.

ScottRFrost commented 4 years ago

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

JibsouX commented 1 year ago

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/