If you’re sick of re-setting up all of your Google Chrome extensions on Linux each time you re-install your operating system, you should know that there’s actually a way to back up a Google Chrome profile under Linux.
It works by copying various configuration files that Chrome uses to set up a profile and saving it for later. Keep in mind that doing this is best when there’s only one user set up to use Chrome. If you’ve got multiple users it is still easy to do, but you may get confused with the different folders.
SPOILER ALERT: Scroll down and watch the video tutorial at the end of this article.
Back Up Chrome Profile – The Traditional Way
To back up your Chrome profile, start out by opening up a terminal window, but be sure NOT to give it root access. This is bad, and you could accidentally make the profile backup outside of your regular user’s permissions. Instead, keep it as your normal user and use the CD command to navigate to ~/.config inside of the home folder.
The config folder is home to most program settings and profiles, and it is here where the Chrome profile information for users is stored. Using the tar command, you’ll need to create a GZip archive of the profile directory entirely.
tar -jcvf google-chrome-profile.tar.bz2 google-chrome
Compression should be quick and easy. When the process finishes, use the MV command to place the backup into your ~/ folder.
mv google-chrome-profile.tar.bz2 ~/
From here you can move your backup to Dropbox, an external hard drive, or even another Linux installation. Keep in mind that if you upload your Chrome profile in an unencrypted state, you make yourself vulnerable to hackers. If you do not want to lock your backups, try to save it in a safe place, and use a secure password on the account/device where the backup is saved.
Restore the backup
To restore the backup, do:
mv google-chrome-profile.tar.bz2 ~/.config cd ~/.config tar -xvf google-chrome-profile.tar.bz2
Encrypt Chrome Profile Backup
To encrypt your Chrome profile backup you need to first, compress your Chrome folder into an archive file (follow the method above). This way makes encryption much easier, as GPG will just be encrypting the archive, rather than having to handle a folder with individual files inside. Once that’s done, install GnuPG to your Linux PC, if it is not already installed. Then, open up a terminal and use the GnuPG tool to encrypt your Chrome profile archive:
gpg -c google-chrome-profile.tar.bz2
Entering gpg -c in the terminal will prompt the user to set a new password. Enter a secure password so that only you will be able to access the encrypted profile. When the encryption process is complete, delete the file “google-chrome-profile.tar.bz2“. Instead, save “google-chrome-profile.tar.bz2.gpg”, as this is the encrypted archive.
To decrypt your Chrome profile to restore the backup, use:
Transplant A Chrome Profile Into Chromium
It is possible to transplant a Linux Google Chrome profile for use with the Chromium browser. It’s a very simple process, and it will work every time due to the nature of how Chromium and Chrome work. It starts off by deleting everything already in the Chromium folder.
Note: it is possible to do this in reverse. If you’d like to copy a Chromium profile into Google Chrome, follow these same instructions, but change ~/.config/chromium to ~/.config/google-chrome.
cd ~/.config/chromium rm * rm -rf *
This leaves the chromium configuration directory completely empty. From here, you’ll be able to easily copy all of the configurations directly from the Google Chrome directory. Use the CP command to copy everything inside to ~/.config/chromium.
cp -a ~/.config/google-chrome/. ~/.config/chromium
After moving files, go ahead and open up Chromium. Make sure that you haven’t opened the browser until now because if you have, you’ll need to delete everything and start again. The reason for this is that the browser’s first run will create a blank profile.
If the profile copy is successful, all of your settings will appear. In addition, all extensions, bookmarks, logged in websites, etc., will also be working — with one issue. Since you’ve copied your profile from one browser to another, it’s “locked” by Chrome (you’ll know it’s locked because the browser will tell you so).
To remove the lockout, click on your name in Chromium and re-enter your Google credentials. Soon after, your profile will unlock again.
Back Up Chrome Profile With Deja Dup
Want a quick and easy way to always have your browser profile backed up? Consider setting up Deja Dup as a plan B. Follow our guide here, and learn how to set up a complete backup of your entire home folder. Doing so will allow you to create periodic, encrypted backups of everything in your home folder — including your Google Chrome browser profile.
Best of all, you can create multiple backups, if restoring one of the snapshots breaks. Along with that, it’s always a good idea to have a duplicate, in case the traditional tar.bz2 backup made earlier fails.