bbprofile Backup Browser Profile

Here is a place for your projects which are not officially supported by the Porteus Team. For example: your own kernel patched with extra features; desktops not included in the standard ISO like Gnome; base modules that are different than the standard ISO, etc...
User avatar
M. Eerie
Moderator
Moderator
Posts: 620
Joined: 31 Aug 2017, 21:18
Distribution: Nemesis Xfce/MATE x64

bbprofile Backup Browser Profile

Post#16 by M. Eerie » 18 Sep 2021, 09:39

Updated script :)

See here
Last edited by M. Eerie on 25 Sep 2021, 11:18, edited 6 times in total.
> Does not compute_ ๐Ÿ––

https://forum.porteus.org/viewtopic.php?p=94310#p94310
https://forum.porteus.org/viewtopic.php?p=84002#p84002
https://forum.porteus.org/viewtopic.php?p=77174#p77174
https://forum.porteus.org/viewtopic.php?f=39&t=8584

User avatar
Ed_P
Contributor
Contributor
Posts: 8341
Joined: 06 Feb 2013, 22:12
Distribution: Cinnamon 5.01 ISO
Location: Western NY, USA

bbprofile Backup Browser Profile

Post#17 by Ed_P » 18 Sep 2021, 17:53

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
Last edited by Ed_P on 18 Sep 2021, 20:47, edited 1 time in total.
Reason: Revised changes list
Ed

Rapha_
Shogun
Shogun
Posts: 238
Joined: 12 Jun 2021, 21:59
Distribution: Xfce 4.12 - 5.rc3 - x86_64
Location: France

bbprofile Backup Browser Profile

Post#18 by Rapha_ » 19 Sep 2021, 00:03

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

User avatar
Ed_P
Contributor
Contributor
Posts: 8341
Joined: 06 Feb 2013, 22:12
Distribution: Cinnamon 5.01 ISO
Location: Western NY, USA

bbprofile Backup Browser Profile

Post#19 by Ed_P » 19 Sep 2021, 02:13

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:~$ 
Ed

User avatar
M. Eerie
Moderator
Moderator
Posts: 620
Joined: 31 Aug 2017, 21:18
Distribution: Nemesis Xfce/MATE x64

bbprofile Backup Browser Profile

Post#20 by M. Eerie » 19 Sep 2021, 08:48

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.
Last edited by M. Eerie on 20 Sep 2021, 16:04, edited 1 time in total.
> Does not compute_ ๐Ÿ––

https://forum.porteus.org/viewtopic.php?p=94310#p94310
https://forum.porteus.org/viewtopic.php?p=84002#p84002
https://forum.porteus.org/viewtopic.php?p=77174#p77174
https://forum.porteus.org/viewtopic.php?f=39&t=8584

Rapha_
Shogun
Shogun
Posts: 238
Joined: 12 Jun 2021, 21:59
Distribution: Xfce 4.12 - 5.rc3 - x86_64
Location: France

bbprofile Backup Browser Profile

Post#21 by Rapha_ » 20 Sep 2021, 12:33

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

User avatar
M. Eerie
Moderator
Moderator
Posts: 620
Joined: 31 Aug 2017, 21:18
Distribution: Nemesis Xfce/MATE x64

bbprofile Backup Browser Profile

Post#22 by M. Eerie » 20 Sep 2021, 13:08

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
> Does not compute_ ๐Ÿ––

https://forum.porteus.org/viewtopic.php?p=94310#p94310
https://forum.porteus.org/viewtopic.php?p=84002#p84002
https://forum.porteus.org/viewtopic.php?p=77174#p77174
https://forum.porteus.org/viewtopic.php?f=39&t=8584

Rapha_
Shogun
Shogun
Posts: 238
Joined: 12 Jun 2021, 21:59
Distribution: Xfce 4.12 - 5.rc3 - x86_64
Location: France

bbprofile Backup Browser Profile

Post#23 by Rapha_ » 20 Sep 2021, 15:28

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

User avatar
M. Eerie
Moderator
Moderator
Posts: 620
Joined: 31 Aug 2017, 21:18
Distribution: Nemesis Xfce/MATE x64

bbprofile Backup Browser Profile

Post#24 by M. Eerie » 20 Sep 2021, 16:18

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!
> Does not compute_ ๐Ÿ––

https://forum.porteus.org/viewtopic.php?p=94310#p94310
https://forum.porteus.org/viewtopic.php?p=84002#p84002
https://forum.porteus.org/viewtopic.php?p=77174#p77174
https://forum.porteus.org/viewtopic.php?f=39&t=8584

Rapha_
Shogun
Shogun
Posts: 238
Joined: 12 Jun 2021, 21:59
Distribution: Xfce 4.12 - 5.rc3 - x86_64
Location: France

bbprofile Backup Browser Profile

Post#25 by Rapha_ » 20 Sep 2021, 17:58

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

User avatar
M. Eerie
Moderator
Moderator
Posts: 620
Joined: 31 Aug 2017, 21:18
Distribution: Nemesis Xfce/MATE x64

bbprofile Backup Browser Profile

Post#26 by M. Eerie » 20 Sep 2021, 18:38

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!
> Does not compute_ ๐Ÿ––

https://forum.porteus.org/viewtopic.php?p=94310#p94310
https://forum.porteus.org/viewtopic.php?p=84002#p84002
https://forum.porteus.org/viewtopic.php?p=77174#p77174
https://forum.porteus.org/viewtopic.php?f=39&t=8584

raja
Shogun
Shogun
Posts: 434
Joined: 02 May 2017, 09:51
Distribution: v3.2.2-32 and Porteus-Artix-64
Location: Chennai,India

bbprofile Backup Browser Profile

Post#27 by raja » 22 Sep 2021, 10:41

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.
Linux Kernel-4.4.272 -32 bit; Linux Kernel-5.4.185 - 64 bit

User avatar
M. Eerie
Moderator
Moderator
Posts: 620
Joined: 31 Aug 2017, 21:18
Distribution: Nemesis Xfce/MATE x64

bbprofile Backup Browser Profile

Post#28 by M. Eerie » 22 Sep 2021, 13:00

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.
> Does not compute_ ๐Ÿ––

https://forum.porteus.org/viewtopic.php?p=94310#p94310
https://forum.porteus.org/viewtopic.php?p=84002#p84002
https://forum.porteus.org/viewtopic.php?p=77174#p77174
https://forum.porteus.org/viewtopic.php?f=39&t=8584

User avatar
Ed_P
Contributor
Contributor
Posts: 8341
Joined: 06 Feb 2013, 22:12
Distribution: Cinnamon 5.01 ISO
Location: Western NY, USA

bbprofile Backup Browser Profile

Post#29 by Ed_P » 22 Sep 2021, 15:40

:o How are you making these video files M. Eerie?
Ed

User avatar
M. Eerie
Moderator
Moderator
Posts: 620
Joined: 31 Aug 2017, 21:18
Distribution: Nemesis Xfce/MATE x64

bbprofile Backup Browser Profile

Post#30 by M. Eerie » 22 Sep 2021, 15:54

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:
> Does not compute_ ๐Ÿ––

https://forum.porteus.org/viewtopic.php?p=94310#p94310
https://forum.porteus.org/viewtopic.php?p=84002#p84002
https://forum.porteus.org/viewtopic.php?p=77174#p77174
https://forum.porteus.org/viewtopic.php?f=39&t=8584

Post Reply