The My Opera forums have been replaced with forums.opera.com. Please head over there to discuss Opera's products and features

See the new Forums

How to Backup and Restore All of Opera's settings

Forums » Documentation and Tutorials » Browser

You need to be logged in to post in the forums. If you do not have an account, please sign up first.

Go to last post

24. October 2011, 11:45:22

burnout426

Posts: 13202

How to Backup and Restore All of Opera's settings

With Opera 11.50+ (fresh install and upgrade thereafter at least), backing up all of Opera's settings is easy.

1. Close down Opera.

2. Copy the profile folder(s) to a safe place.

That will backup all your settings (including your mail and all of its settings).

On linux, the profile folder is located at "~/.opera".

On WinXP, *each* roaming and local Opera profile folder (you need to back up both the local and roaming for each) are located in:

"C:\Documents and Settings\user\Application Data\Opera"
"C:\Documents and Settings\user\Local Settings\Application Data\Opera"

On Vista/Win7, they're located in:

"C:\Users\user\AppData\roaming\Opera"
"C:\Users\user\AppData\local\Opera"

If you use a stand-alone installation, in the installation folder, it'll be a single folder named "profile" that contains everything.

Then, when you want to use those backups to restore all settings, put copies (so you never put the original backups in use) of the folders you backed up where they belong (replacing existing profile folders that are already there, or rename the existing folders first).

That's it. That way, you don't have to do any exporting and importing at all.

Note that for IMAP accounts, the cache of messages in the mail/store folder will be incomplete unless you have "make all messages available offline" set on the "incoming" tab in each IMAP account's properties. So, if you want to use the IMAP cache to backup all your IMAP messages, make sure they're all available offline first. Just note that it's just an IMAP cache (unlike with a POP account), and if all messages are removed from the IMAP server, syncing mail will wipe out the cache. That's why it's good to keep a separate copy of just the store folder (for importing into a local POP account and dragging to the IMAP account to upload the messages back to the IMAP server) just in case all messages are lost from the IMAP server.

Note that when copying Opera's profile folders to a new computer, copy them first and then install Opera on the new computer to the same folder name as used on the old computer. Then, that Opera will act as if those profile folders have always been there. If you install Opera first, you'll have to delete the profile folders it creates first.

Also, see <http://my.opera.com/operawiki/forums/topic.dml?id=1351732> for important notes about paths in operaprefs.ini and accounts.ini when moving your profile around (to a new computer for example).

As an alternative, you can try <http://my.opera.com/Disco%20Stu/blog/opera-settings-import-export-tool>.

Now, if you just want to backup and restore mail, see <http://my.opera.com/operawiki/forums/topic.dml?id=1132992>.

31. January 2012, 00:17:55

efalis

Posts: 3

I'm getting ready to move my wife's email etc from Windows 7 to Ubuntu. If I follow the approach you've outlined here, how do merge the two windows profile directories into the single Linux one? Or is there a better way?

Thanks,

- Ed

31. January 2012, 03:18:01

burnout426

Posts: 13202

Originally posted by efalis:

I'm getting ready to move my wife's email etc from Windows 7 to Ubuntu. If I follow the approach you've outlined here, how do merge the two windows profile directories into the single Linux one? Or is there a better way?



After you install Opera on Ubuntu and you have the .opera profile folder in your home folder, close Opera and replace its files with copies of the ones in your backup.

For example, replace bookmarks.adr with the one from your backup. Same with wand.dat (passwords), cookies4.dat (cookies) etc. You'd also replace the mail folder with a copy of your backup.

Basically, all the folders from both the roaming and local Opera profile on Win7 go in the root of .opera on Ubuntu and all the files that are next to operaprefs.ini in the roaming Opera profile go in the root of .opera too.

It'd probably be best to keep the new operaprefs.ini that's created on Unbuntu and not use the backup though. This is because there might be windows paths in it. But, if you remove all the settings in operaprefs.in that have a path in it, Opera should use the default location. The only other thing you'd have to worry about is the path for the signatures in accounts.ini in the mail folder (If she uses mail). The paths there might need to begin with {SmallPreferences} instead of {LargePreferences}. Besides that, just make sure that once you copy the files and folders to ubuntu, the read and write permissions on them are correct.

31. January 2012, 14:40:54

efalis

Posts: 3

Thanks much. That all should do it.

- Ed

28. February 2012, 10:58:55 (edited)

burnout426

Posts: 13202

Warning: Use this info and the scripts at your own risk. I make no guarantees.

Here's an example of backing up and restoring with simple bat/cmd files scripts:

On Win7 x64 with 7-zip x64 installed, while Opera is closed, you just double-left-click the cmd file to backup/restore all Opera profiles you have (both roaming and local parts of each).

win7_backup_opera_profiles.cmd
"%PROGRAMFILES%\7-Zip\7z.exe" a -t7z "Opera_Roaming_Profiles.7z" "%APPDATA%\Opera"
"%PROGRAMFILES%\7-Zip\7z.exe" a -t7z "Opera_Local_Profiles.7z"  "%LOCALAPPDATA%"\Opera"
pause


win7_restore_opera_profiles.cmd

(By default, this overwrites files in existing profiles. See the remark lines for how to make it wipe out existing profiles first.)
"%PROGRAMFILES%\7-Zip\7z.exe" x "-o%APPDATA%" "Opera_Roaming_Profiles.7z"
"%PROGRAMFILES%\7-Zip\7z.exe" x "-o%LOCALAPPDATA%" "Opera_Local_Profiles.7z"  
pause


On a fresh Win7 install, you'd run win7_restore_opera_profiles.cmd before installing all your Operas. Then, when installing all your Operas (with the same Opera program file folder names you used on the old install of Win7), it'd be like the profiles where always there in the new install.

On a dirty win7 install, win7_restore_opera_profiles.cmd will just overwrite files and folders in the Local and Roaming Opera profile directories. But, rmdir commands could be added first to wipe out all current Opera profiles and restore clean. The commands for that would be:

rmdir /S /Q "%APPDATA%\Opera"
rmdir /S /Q "%LOCALAPPDATA%"\Opera"


And, here are more robust versions of the above with support for WinXP (but only tested on Win7 currently):

backup_opera_profiles.cmd
@cls
@echo This script backs up all of your Opera profiles (on WinXP/Vista/Win7) 
@echo that are in the standard AppData and LocalAppData folders
@echo.
@echo Make sure to shut down all Operas first.
@echo.
@pause
@set "ZipPath=%ProgramFiles%\7-Zip\7z.exe"
@IF NOT EXIST "%ZipPath%" set "ZipPath=%ProgramFiles(x86)%\7-Zip\7z.exe"
@IF NOT EXIST "%ZipPath%" goto no7zip
@IF NOT DEFINED LOCALAPPDATA set "LOCALAPPDATA=%USERPROFILE%\Local Settings\Application Data"

"%ZipPath%" a -t7z "Opera_Roaming_Profiles.7z" "%APPDATA%\Opera"
"%ZipPath%" a -t7z "Opera_Local_Profiles.7z" "%LOCALAPPDATA%\Opera"

@rem comment out the two commands above and uncomment the following two commands to write results to a log file instead

@rem "%ZipPath%" a -t7z "Opera_Roaming_Profiles.7z" "%APPDATA%\Opera" > opera_profile_backup_log.txt
@rem "%ZipPath%" a -t7z "Opera_Local_Profiles.7z" "%LOCALAPPDATA%\Opera" >> opera_profile_backup_log.txt

@goto end

:no7zip
@echo 7-zip doesn't appear to be installed. You can get it from 7zip.org. Install it to the default location

:end
@pause


restore_opera_profiles.cmd:
@cls
@echo This script restores all of your Opera profiles (on WinXP/Vista/Win7) 
@echo that were backed up with the backup_opera_profiles.cmd script
@echo.
@echo Make sure to shut down all Operas first.
@echo.
@pause
@set "ZipPath=%ProgramFiles%\7-Zip\7z.exe"
@IF NOT EXIST "%ZipPath%" set "ZipPath=%ProgramFiles(x86)%\7-Zip\7z.exe"
@IF NOT EXIST "%ZipPath%" goto no7zip
@IF NOT DEFINED LOCALAPPDATA set "LOCALAPPDATA=%USERPROFILE%\Local Settings\Application Data"

rem Uncomment the next two lines to wipe out all existing Opera profiles before restoring
rem rmdir /S /Q "%APPDATA%\Opera"
rem rmdir /S /Q "%LOCALAPPDATA%"\Opera"
"%ZipPath%" x "-o%APPDATA%" "Opera_Roaming_Profiles.7z"
"%ZipPath%" x "-o%LOCALAPPDATA%" "Opera_Local_Profiles.7z"

@goto end

:no7zip
@echo 7-zip doesn't appear to be installed. You can get it from 7zip.org. Install it to the default location

:end
@pause

4. November 2012, 19:37:42

skewered

Posts: 27

Originally I installed Opera 12.02 as a standalone on my old win2k machine, so now I have a "profile" folder.

But on my new win7 machine I did a full install of Opera12.02x64.

Where do I copy the profile folder to? The full install on win7 has two folders-- a Local one and a Roaming one, both in AppData. And they seem to split the profile folder into parts.

Any advice? Thanks!

SK
Opera 12.02 in Windows 2000 with Pentium 3, 1GB RAM

5. November 2012, 17:54:26

burnout426

Posts: 13202

Originally posted by skewered:

Where do I copy the profile folder to? The full install on win7 has two folders-- a Local one and a Roaming one, both in AppData. And they seem to split the profile folder into parts.



If you want to convert the 2 folders to a single profile folder:

Take the files and folders that are *in*: "C:\Users\user\AppData\roaming\Opera\Opera" and "C:\Users\user\AppData\local\Opera\Opera" and put them all in the same folder.

If you want to separate a "profile" folder into local and roaming profile folders, you just split the files and folders up. You can look at your current roaming and local profile folders to see what goes where. Or, this list might help. Then, you'd replace your existing Opera profile folders with those ones. Or, put them at different locations ("C:\Users\user\AppData\roaming\Opera\Opera 2" and "C:\Users\user\AppData\local\Opera\Opera 2" and install another Opera to "C:\Program Files\Opera 2" for example).

See <http://my.opera.com/operawiki/forums/topic.dml?id=1351732> though about fixing/removing paths in operaprefs.ini so that Opera uses the default paths.

Now, if you just want to back up your win7 local and roaming profile folders, you just copy them both to a safe place.

Note though that if you create "profile" folder from a local and roaming profile folder and want to use that folder in a standalone installation, make sure "operaprefs_default.ini" that's next to opera.exe (not "operaprefs.ini") has mutli user set to 0.

Forums » Documentation and Tutorials » Browser