Page 2 of 5

bbprofile Backup Browser Profile

Posted: 18 Sep 2021, 09:39
by M. Eerie
Updated script :)

See here

bbprofile Backup Browser Profile

Posted: 18 Sep 2021, 17:53
by Ed_P
An impressive script M. Eerie. :o
M. Eerie wrote:
18 Sep 2021, 09:39
NOTE: Not sure where Edge Browser stores his profile.
I suspect it would be in here:

Code: Select all

/home/guest/.config/microsoft-edge-beta/Default
In checking changes made using Edge I saw:

Code: Select all

/mnt/live/memory/changes/home/guest/.config/microsoft-edge-beta
/mnt/live/memory/changes/home/guest/.config/microsoft-edge-beta/Local State
/mnt/live/memory/changes/home/guest/.config/microsoft-edge-beta/BrowserMetrics/BrowserMetrics-61464C34-11C4.pma
/mnt/live/memory/changes/home/guest/.config/microsoft-edge-beta/Default
/mnt/live/memory/changes/home/guest/.config/microsoft-edge-beta/Default/Preferences
/mnt/live/memory/changes/home/guest/.config/microsoft-edge-beta/Default/Network Persistent State
/mnt/live/memory/changes/home/guest/.config/microsoft-edge-beta/Default/load_statistics.db-wal
/mnt/live/memory/changes/home/guest/.config/microsoft-edge-beta/Default/WebAssistDatabase-journal
/mnt/live/memory/changes/home/guest/.config/microsoft-edge-beta/Default/WebAssistDatabase
/mnt/live/memory/changes/home/guest/.config/microsoft-edge-beta/Default/Network Action Predictor-journal
/mnt/live/memory/changes/home/guest/.config/microsoft-edge-beta/Default/Network Action Predictor
/mnt/live/memory/changes/home/guest/.config/microsoft-edge-beta/Default/Session Storage/000003.log
/mnt/live/memory/changes/home/guest/.config/microsoft-edge-beta/Default/Cookies-journal
/mnt/live/memory/changes/home/guest/.config/microsoft-edge-beta/Default/Cookies
/mnt/live/memory/changes/home/guest/.config/microsoft-edge-beta/Default/Sessions/Session_13276470584884629
/mnt/live/memory/changes/home/guest/.config/microsoft-edge-beta/Default/Favicons-journal
/mnt/live/memory/changes/home/guest/.config/microsoft-edge-beta/Default/Favicons
/mnt/live/memory/changes/home/guest/.config/microsoft-edge-beta/Default/History-journal
/mnt/live/memory/changes/home/guest/.config/microsoft-edge-beta/Default/History
/mnt/live/memory/changes/home/guest/.config/microsoft-edge-beta/Default/Visited Links

bbprofile Backup Browser Profile

Posted: 19 Sep 2021, 00:03
by Rapha_
Thank you very much, M. Eerie !

it works perfectly well with v5.0rc3 and Firefox ! :crazy:
And it is very useful....


On the inconvenience side, the created module is not recognized by Porteus v4. (it is not mountable or extractable too)

I tried the script in Porteus 4, but it doesn't seem to work either . no module appears in "/guest/Desktop/" or "/modules/"

Code: Select all

firefox/t4nfe2m4.default-release/weave/toFetch/
firefox/t4nfe2m4.default-release/weave/toFetch/tabs.json
systemextensionsdev/

sent 41,452,388 bytes  received 1,206 bytes  82,907,188.00 bytes/sec
total size is 41,437,337  speedup is 1.00
mksquashfs: Compressor "zstd" is not supported!
mksquashfs: Compressors available:
	gzip
	lzma
	lzo
	xz (default)
mv: cannot stat '/tmp/tmp.goq613/009-profile-firefox-20210919-0111.xzm': No such file or directory

Your profile module is saved in /home/guest/Desktop/009-profile-firefox-20210919-0111.xzm
Would you like to copy it into your /mnt/sda1/Porteus4//porteus/modules folder? [y/n] y

cp: cannot stat '/home/guest/Desktop/009-profile-firefox-20210919-0111.xzm': No such file or directory
Module copied and ready to be activated at next boot

bbprofile Backup Browser Profile

Posted: 19 Sep 2021, 02:13
by Ed_P
It didn't work for me, Cinnamon 5.0rc3 and Firefox.

Code: Select all

guest@porteus:~$ ./bbprofile.sh
Usage: bbprofile.sh <browser>
Supported Browsers: 
	 -f (firefox)
	 -o (opera)
	 -v (vilvaldi)
	 -u (chromium)
	 -c (chrome)
guest@porteus:~$ -f
bash: -f: command not found
guest@porteus:~$ 
Added in 2 hours 40 minutes 53 seconds:
Ok, figured it out.

Code: Select all

guest@porteus:~$ ./bbprofile.sh -f
Exclude caches, backups, storage and reports (crashes,dumps...) ? [y/n] y

building file list ... done
./
 :
 :
Your profile module is saved in /home/guest/Desktop/009-profile-firefox-20210919-0044.xzm
Would you like to copy it into your /mnt/isoloop/porteus/modules folder? [y/n] n

Module not copied in /mnt/isoloop/porteus/modules
guest@porteus:~$ 
guest@porteus:~$ ls -lh $HOME/Desktop/*.xzm
-rw-r--r-- 1 guest users 11M Sep 19 00:44 /home/guest/Desktop/009-profile-firefox-20210919-0044.xzm
guest@porteus:~$ 

bbprofile Backup Browser Profile

Posted: 19 Sep 2021, 08:48
by M. Eerie
Rapha_ wrote:
19 Sep 2021, 00:03
On the inconvenience side, the created module is not recognized by Porteus v4. (it is not mountable or extractable too)
Ok, sorry. I know what it is... I'm forcing to use zstd as the compression method to build up the .xzm module.

Just change the line that reads:

Code: Select all

mksquashfs $target/home $target/$profile -b 1M -comp zstd -b 1M -Xcompression-level 22 -noappend -keep-as-directory
with this one:
dirtoxzm $target/home $target/$profile

Code: Select all

dir2xzm $target/home $target/$profile
Please try and let me know if it solves the issue.

bbprofile Backup Browser Profile

Posted: 20 Sep 2021, 12:33
by Rapha_
Ok I tried with the script modified on (Porteus4 - lxqt) : it doesn't work also . No *.xzm file created

Code: Select all

firefox/t4nfe2m4.default-release/weave/toFetch/
firefox/t4nfe2m4.default-release/weave/toFetch/tabs.json
systemextensionsdev/

sent 50,180,324 bytes  received 1,272 bytes  33,454,397.33 bytes/sec
total size is 50,162,660  speedup is 1.00
bbprofile_2.sh: line 34: dirtoxzm: command not found
mv: cannot stat '/tmp/tmp.vLdkg7/009-profile-firefox-20210920-1309.xzm': No such file or directory

Your profile module is saved in /home/guest/Desktop/009-profile-firefox-20210920-1309.xzm
Would you like to copy it into your /mnt/sda1/Porteus4//porteus/modules folder? [y/n] y
                                                                               
cp: cannot stat '/home/guest/Desktop/009-profile-firefox-20210920-1309.xzm': No such file or directory
Module copied and ready to be activated at next boot 
"dirtoxzm" not known....

Code: Select all

root@porteus:/home/guest# dirtoxzm
bash: dirtoxzm: command not found

bbprofile Backup Browser Profile

Posted: 20 Sep 2021, 13:08
by M. Eerie
Rapha_ wrote:
20 Sep 2021, 12:33
bash: dirtoxzm: command not found

:oops: I'm sorry... The command is: dir2xzm

Or, the equivalent:

Code: Select all

mksquashfs $target/home $target/$profile -b 256K -comp xz -Xbcj x86 -noappend -keep-as-directory

bbprofile Backup Browser Profile

Posted: 20 Sep 2021, 15:28
by Rapha_
This time it works on Porteus 4 with these 2 last alternatives :thumbup:
Not yet tried to boot with it....


dir2xzm $target/home $target/$profile
Juste this error with this one:

Code: Select all

rsync: delete_file: rmdir(home/guest) failed: Permission denied (13)
cannot delete non-empty directory: home
rsync error: some files/attrs were not transferred (see previous errors) (code 23) at main.c(1189) [sender=3.1.3]

mksquashfs $target/home $target/$profile -b 256K -comp xz -Xbcj x86 -noappend -keep-as-directory
No error message here

bbprofile Backup Browser Profile

Posted: 20 Sep 2021, 16:18
by M. Eerie
Rapha_ wrote:
20 Sep 2021, 15:28
Juste this error with this one:
Perhaps you aborted the process and then resumed??? Both commands do the same if you use Porteus.

The reported errors appear when trying to delete the temporary folder once the module is created.
This has nothing to do with the command used to create the module.

Please be sure your script is exactly as the one posted at #16

Thanks!

bbprofile Backup Browser Profile

Posted: 20 Sep 2021, 17:58
by Rapha_
1
dir2xzm $target/home $target/$profile
- the script ask me a password (root)
- can not boot with this module



2
mksquashfs $target/home $target/$profile -b 256K -comp xz -Xbcj x86 -noappend -keep-as-directory
This one is ok - can boot with it




I juste changed the line you said...like this :

Code: Select all

#mksquashfs $target/home $target/$profile -b 1M -comp zstd -b 1M -Xcompression-level 22 -noappend -keep-as-directory
#dirtoxzm $target/home $target/$profile
dir2xzm $target/home $target/$profile
#mksquashfs $target/home $target/$profile -b 256K -comp xz -Xbcj x86 -noappend -keep-as-directory


"dir2xzm" ask me root password :

Code: Select all

guest@porteus:/mnt/sda1/Iso_linux/Modules/sessions$ dir2xzm
readlink: missing operand
Try 'readlink --help' for more information.
readlink: missing operand
Try 'readlink --help' for more information.
glibtop(c=1651): [DEBUG] open.c:53 glibtop_open_l(): SIZEOF: 40 - 65648 - 248 - 65624 - 224 - 65624
glibtop(c=1651): [DEBUG] open.c:163 glibtop_open_l(): Calling sysdeps open function.
glibtop(c=1651): [DEBUG] init.c:229 glibtop_init_s(): init_s with features=0x7ffffff and flags=0
readlink: missing operand
Try 'readlink --help' for more information.
readlink: missing operand
Try 'readlink --help' for more information.

Convert directory tree into .xzm compressed module
usage: /opt/porteus-scripts/dir2xzm source_directory output_file.xzm

bbprofile Backup Browser Profile

Posted: 20 Sep 2021, 18:38
by M. Eerie
Rapha_ wrote:
20 Sep 2021, 17:58
"dir2xzm" ask me root password :
Thank you very much for reporting, I didn't remember that detail about dir2xzm...
So, I've changed the script.

Thanks again!

bbprofile Backup Browser Profile

Posted: 22 Sep 2021, 10:41
by raja
eerie, Browser profiles and other personal conf files are stored in /home/guest, as per Porteus norms.

probably, you have added your user_id with root privileges.

Your code looks for profiles in root. Regular users who login as guest will not have browser profiles in root and no copying will happen to /tmp.

Changing path to profile as /home/guest/, instead of $HOME(root) only will work for normal users.

Again, module created shall be copied to guest desktop or guest/Downloads and not root/desktop.

bbprofile Backup Browser Profile

Posted: 22 Sep 2021, 13:00
by M. Eerie
raja wrote:
22 Sep 2021, 10:41
probably, you have added your user_id with root privileges.
No, I just use guest account and the script doesn't need root privileges at all.

Image

Can you try, please?

I don't know exactly what's going on.

Is there anyone facing similar problems?

Thanks.

Edit: @raja Please, see the linked gif.

bbprofile Backup Browser Profile

Posted: 22 Sep 2021, 15:40
by Ed_P
:o How are you making these video files M. Eerie?

bbprofile Backup Browser Profile

Posted: 22 Sep 2021, 15:54
by M. Eerie
Ed_P wrote:
22 Sep 2021, 15:40
How are you making these video files
Peek it, man
In this very thread, you asked a year ago... For @ncmprhnsbl's sake, Peek it!!! :lol: