3

I am migrating from one notebook running 19.10 to a new notebook running 20.04. I know how to migrate directly-installed programs like Firefox (e.g., copy ~/.mozilla).

But, how do I do the equivalent for snaps like Chromium? I would like to copy the settings, bookmarks, etc. I poked around ~/snap/chromium, but it does not feel like this data is contained there. And ~/.config/chromium seems to be from when it was not a snap, based on last-modified timestamps.

CommonsWare
  • 505
  • 2
  • 7
  • 21
  • 1
    Everything I've seen indicates that they're in ~/snap/<app_name> directory. For instance, see this link. – KGIII Jul 24 '20 at 23:25
  • OK, that has bookmarks, though apparently not account data (I am forced to re-login to sites that I had been logged into). I can get by with that, but I will leave this question open to see if there are other options that cover more stuff. Many thanks! – CommonsWare Jul 24 '20 at 23:42
  • Very relevant: https://forum.snapcraft.io/t/solved-chromium-snap-profile-migrated-manually-now-im-confused-about-its-location-s/14065. Also: https://forum.snapcraft.io/t/two-chromium-profiles-for-one-user/5716. Both include input from the Snap and Chromium developers that your profile should be in ~/snap/chromium. Since you are encountering problems, I would open a thread there and let them see how the profile does not copy. – user535733 Jul 25 '20 at 00:10
  • Don't use snaps. They're more trouble than they're worth. Remove the Chromium snap and re-installl Chromium - sudo apt install chromium-browser. Then it's easy to transfer Chromium configurations from your Home folder. – Paul Benson Jul 25 '20 at 00:55
  • @PaulBenson When you do apt install chromium-browser it pulls the snap without asking you. See https://askubuntu.com/q/1204571/124466 – Archisman Panigrahi Jul 25 '20 at 02:07
  • How can that be? Snap and apt are 2 independent systems for installing applications. There's no connection on installing between the 2 processes. – Paul Benson Jul 25 '20 at 23:47
  • @PaulBenson that is how it now works for Chromium in Ubuntu 20.04. APT and snap are integrated, and increasingly we may start to see dummy packages appear in APT that redirect to a snap install. – vanadium Jul 26 '20 at 08:13
  • Chromium is only now available as a snap. In Ubuntu 18.04 it was still officially supported as a debian package. That has now stopped. APT and snap are not the same thing. In Linux Mint there are no snaps and Chromium is now totally unsupported in LM20. – Paul Benson Jul 26 '20 at 11:57

1 Answers1

5

The user configuration data of the snap version of Chromium are located under

$HOME/snap/chromium/common/chromium/Default

So it would be sufficient to copy the contents of that folder over to the new installation to restore your bookmarks, settings and extensions.

On the new installation, run Chromium for the first time in order to create the new default user configuration data (folders and files under ~/snap/chromium). Then replace the contents of the folder mentioned above with your backup profile from another Chromium install.

vanadium
  • 88,010
  • Are you sure all the contents of the Default folder should be replaced or should it be done via a merge with overwriting, like it is instructed in the documentation for Firefox, in order to preserve any files or folders created there by Chromium on the first run that are not in the backup profile? – geras Nov 29 '22 at 18:06
  • I have actually found some files and folders like this by using the command diff -rq snap/chromium/common/chromium/Default backup_location | grep "Only in snap/chromium/common/chromium/Default"command (kudos to https://stackoverflow.com/a/29299485/10017885). The results are: folder blob_storage/<some random string>, 5 files Cache/Cache_Data/<some random string>, file Local Storage/leveldb/000003.log, file Sessions/Session_<some random number> and file Session Storage/000003.log. – geras Nov 29 '22 at 21:29
  • Also, Default/README says "Chromium settings and storage represent user-selected preferences and information and MUST not be extracted, overwritten or modified except through Chromium defined APIs.". – geras Nov 29 '22 at 21:29