[Solved] Chromium snap: profile migrated manually, now I'm confused about its location(s)

Kubuntu 19.04

-My goal: what is a non-changing path of my Chromium snap user profile? (for my rsync backup script.)

-What I did: 2019-11-01 manual copy of my profile as instructed in osomon post. :warning:[edit: these steps are obsolete, see later replies.] from .bash_history:

sudo snap install chromium
mkdir -p ~/snap/chromium/current/.config
cp -R ~/.config/chromium ~/snap/chromium/current/.config/

How things are now: $HOME/snap/chromium:

drwxr-xr-x 5 ... Nov  1 10:02 920/
drwxr-xr-x 5 ... Nov  8 07:18 937/
drwxr-xr-x 3 ... Nov  1 10:02 common/
drwxrwxr-x 3 ... Nov  1 09:57 current/

The ‘937’ revision dir reflects my recent usage (e.g. my bookmarks file), the ‘current’ dir does not (frozen in time at presumably copy command timestamp).

-What I’m confused about: An osomon post via web searching says ‘current’ is a symbolic link:

“'current’ is a symbolic link to the current revision of the snap that is installed”

but it’s not in my case (‘d’ not ‘l’).

I assume that if ‘current’ were a s-link to my active profile and adjusted automatically by the snap service then that would be the solution to my goal since 937 will eventually increment.

What should I do? Thanks for any help.

You should remove current folder and replace it with symlink to 937 named current. I guess snapd can’t make the symlink themselves after you created folder with this name manually before.

Chromium snap would automatically import your config from ~/.config/chromium on first run so your action was unnecessary and lead to trouble.

These instructions are outdated (and partially incorrect indeed). The chromium snap will now find an existing profile in ~/.config/chromium, and will copy it over to ~/snap/chromium/current/.config on first run, if no profile exists.
So I suggest deleting ~/snap/chromium/* and then running chromium again.

Your backup script should copy the contents of the destination of the current symlink in ~/snap/chromium.

Success! :white_check_mark: Thanks for the fix. Solution for future web searchers: as per oSoMoN advice: -Copy ‘937’ dir (this is my current profile holder) somewhere as a temp backup, if you wish. -Reverse my original copy step:

mkdir ~/.config/chromium  (I had removed earlier)
cp -iR ~/snap/chromium/937/.config/chromium/*  ~/.config/chromium/
rm -IR ~/snap/chromium/*

Start chromium snap (it will copy your profile silently). Verify results:

ls -l ~/snap/chromium/
drwxr-xr-x .. 937
drwxr-xr-x .. common
lrwxrwxrwx .. current -> 937

‘current’ is now a s-link to my active profile. ‘~/.config/chromium’ is now unnecessary, remove if you wish.