The quickest way to make a backup of the Opera browser settings on the Linux desktop is through the terminal, using the Tar archiving tool. The reason? Tar can compress all of your browser data fast, and compress it much easier than with any Linux file manager.
Back up Opera browser settings
To start the backup process, close all open instances of the Opera browser on your Linux desktop. The browser must be closed during the backup process, as Opera tends to create files in the Linux file system while in use. Then, after closing Opera, launch a terminal window by pressing Ctrl + Alt + T or Ctrl + Shift + T on the keyboard.
After launching a terminal window, use the CD command and move the terminal session from the (~) home directory into the ~/.config
directory. This directory holds all of the Opera configuration files.
Inside of the ~/.config
directory, run the ls command, and locate the “opera” folder to confirm that your Linux PC has Opera configuration files in the ~/.config directory.
ls
Can’t find the “opera” folder with the ls command? Too many folders to sort through? Try running the ls command in combination with grep to filter out the unnecessary folders and files.
ls | grep opera
Confirm that the ls command shows “opera”. If “opera” does indeed show up, move on to the “compression” portion of this guide. It explains how to create a Tar archive of your browser settings.
If the command does not show “opera”, your Opera browser configuration files are not on your Linux PC, and you must log in to Opera before attempting to create a backup.
Compressing Opera browser files with Tar
The Opera browser’s data must be compressed if it is to be uploaded to a backup service (like a personal server or cloud provider) as loose files often get deleted accidentally. Additionally, compressed files are easier to encrypt.
To start the compression process of your Opera browser files, use the CD command to move into the ~/.config
directory, which you searched earlier with the ls command. It is essential to move the terminal into the ~/.config
folder for the Tar tool to compress correctly.
cd ~/.config
Inside of the ~/.config
folder, run the tar command with the czvf flags to create a new compressed TarGZ archive of your Opera browser settings.
tar -czvf my-opera-browser-backup.tar.gz opera
When the Tar tool finishes the compression process, it will output a TarGZ file in the ~/.config
directory with the name of my-opera-browser-backup.tar.gz
. From here, use the mv command to move the file from ~/.config
to the home directory for easy access.
mv my-opera-browser-backup.tar.gz ~/
Once the my-opera-browser-backup.tar.gz file is placed in your home directory, the backup is ready to be uploaded to various cloud storage sites (Dropbox, Google Drive, iCloud, etc.), moved to an external hard drive, or moved to a home server for safekeeping. However, keep in mind that this backup is not encrypted, so anyone can decompress it and gain access to your private Opera browser data!
Encrypting the backup
The my-opera-browser-backup.tar.gz
file is unencrypted, which means that your browser settings are accessible to bad actors. To safeguard your backup, you’ll need to encrypt it with the GPG command.
To start the encryption process, open up a terminal window and follow the step-by-step instructions below.
Note: you must have the GPG app installed. Go to pkgs.org if you need help getting it working.
Step 1: Ensure you have GPG installed by running the gpg –help command.
gpg --help
Step 2: Move the terminal from ~/.config
to the home directory (~) using the CD command.
cd ~/
Step 3: Encrypt my-opera-browser-backup.tar.gz
with the gpg -c command. Be sure to enter a secure password.
gpg -c my-opera-browser-backup.tar.gz
The output will be my-opera-browser-backup.tar.gz.gpg
.
Step 4: Delete the unencrypted backup, as it is no longer necessary to keep.
rm my-opera-browser-backup.tar.gz
Restore the backup
To restore your Opera Browser backup, do the following in a terminal window. Please note that if you chose not to encrypt your backup, you must skip steps 1 and 2 as they do not apply to you.
Step 1: Place the encrypted my-opera-browser-backup.tar.gz.gpg
file in the home directory (~) using your Linux file manager.
Step 2: Open up a terminal window and use the gpg command to decrypt the my-opera-browser-backup.tar.gz.gpg
file.
gpg my-opera-browser-backup.tar.gz.gpg
Step 3: Decompress the decrypted TarGZ Opera backup in your home directory using the tar xvf commands.
tar xvf my-opera-browser-backup.tar.gz
Once the tar command decompresses your backup, a folder with the name of “opera” will appear in your home directory. This folder holds all Opera browser data.
Step 4: Using the mv command, place the “opera” folder into the ~/.config
directory. Placing the files here will restore your Opera profile settings.
mv opera/ ~/.config
After placing the “opera” folder in the ~/.config
directory, feel free to open up the Opera browser, and you’ll be able to access your bookmarks, passwords, and other browser settings.