Open Bug 664141 Opened 11 years ago Updated 4 years ago

advanced backup/restore profile with settings

Categories

(Testing Graveyard :: ProfileManager, enhancement)

x86
Windows XP
enhancement
Not set
normal

Tracking

(Not tracked)

People

(Reporter: fred_spamfighter-mozaddon, Unassigned)

Details

User-Agent:       Mozilla/5.0 (Windows NT 5.1; rv:2.0.1) Gecko/20100101 Firefox/4.0.1
Build Identifier: v1.0 build/201105111727

see below

Reproducible: Always


Actual Results:  
Currently, Profile Manager (PM) backs up all profile content with "Backup folder" mechanism.

This method has some disadvantages:

    - a profile folder may be huge, this increases the backup time process and takes OS disk space because backups are stored in "%APPDATA%\Mozilla\Firefox\Profiles\backups"

    - this is a non sense to backup all files and folders because most of them are not relevant to be restored (i.e.:"extensions" and "cache" folder, urlclassifier3.sqlite, XUL.mfl, XPC.mfl)

    - when you will restore a backup, you'll overwrite all your current personnal data with old one and you may lose some passwords, bookmarks, security certificates... Setting which data you want to backup or restore would prevent that.

    - sometime, you just want to repair/restore a data, not overwrite your profile with an old one.

Expected Results:  
My experiences:

I wrote some batch scripts that I've used since firefox 2 to backup, restore and repair profiles.

The backup mechanism only copies those files plus some others related to addon (i.e.:menuedit) to a safe place :

    cert_override.txt
    cert8.db
    key3.db
    localstore.rdf
    mimeTypes.rdf
    permissions.sqlite
    persdict.dat
    places.sqlite
    prefs.js
    search.rdf 
    signons.sqlite

The restore mechanism restores files above plus delete some auto regenerated files known to cause various issues to prevent them and clear the profile of the uneeded files and folders (if exist):

    file= .autoreg
    file= addons.sqlite
    file= blocklist.xml
    file= brief.sqlite (addon)
    file= cert_override.txt
    file= compatibility.ini
    file= compreg.dat
    file= content-prefs.sqlite
    file= cookies* (option)
    file= downloads.sqlite
    file= extensions.cache
    file= extensions.log
    file= extensions.rdf
    file= extensions.sqlite
    file= flashgot.log (addon)
    file= formhistory.sqlite (option)
    file= localstore-1.rdf
    file= localstore-safe.rdf
    file= parent.lock
    file= pluginreg.dat
    file= secmod.db
    file= sessionstore*
    file= urlclassifier*
    file= webappsstore.sqlite
    file= xmarks.log (addon)
    file= XPC.mfl
    file= xpti.dat
    file= XUL.mfl
   
    folder= "Cache"
    folder= "firebug"
    folder= "minidumps"
    folder= "OfflineCache"
    folder= "startupCache"
    folder= "weave"
    folder= "extensions\staged-xpis"
   
The repair mechanism tries to solve some issues related to addons by deleting:
   
    file= .autoreg
    file= addons.sqlite
    file= extensions.cache
    file= compatibility.ini
    file= compreg.dat
    file= extensions.log
    file= extensions.rdf
    file= extensions.sqlite
   
    folder= "extensions\staged-xpis"
   
I always had good results using those scripts and they can be a basis to code a better tool for PM.

What I would suggest:

MozBackup has some interesting features that could be drawn and improved.

   1. For each profile, user could set:

    - what kind of data to backup
        - all
        - partial (check box for those components): addons, bookmarks and history, cookies, permissions, form history, passwords, certificates, user dictionnary entries, toolbar customisation, preferences, action to perform when downloading certain types of files, search plugins, some other unknown files detected in the profile that could be listed and selected (like MozBackup)       

   2. Those settings would be preserved for each profile.
   3. Ask user to chose what component to restore before a restoration process
   4. Add an addon repair/clear profile option.


Here is the files and folders related to component.

    addons= extensions (folder)
    bookmarks and history= places.sqlite (and NOT "bookmarkbackups")
    cookies= cookies.sqlite
    permissions= permissions.sqlite, cert_override.txt
    form history= formhistory.sqlite
    passwords= signons.sqlite, key3.db
    certificates= cert8.db, key3.db, cert_override.txt
    user dictionnary entries= persdict.dat
    toolbar customisation= localstore.rdf
    preferences= user.js, prefs.js
    action to perform when downloading certain types of files= mimeTypes.rdf
    search plugins= search.sqlite
   
====================================
My current config:

OS= MS Windows XP Professional 32-bit SP3 french
OS partition= C:

Profile Manager= v1.0 build/201105111727

Firefox version= 3.6.17 & 4.0.1

Firefox 3 install path= "D:\Mes Programmes\Internet\Firefox 3\firefox.exe"
Firefox 4 install path= "D:\Mes Programmes\Internet\Firefox\firefox.exe"

Firefox profile.ini  path= "C:\Documents and Settings\USER Name\Application Data\Mozilla\Firefox\profiles.ini"

i.e.: "%APPDATA%\Mozilla\Firefox\profiles.ini"
====================================
Would be great to be able to customize the backup path too.

cheers
Thanks for filing this.
Status: UNCONFIRMED → NEW
Ever confirmed: true
Product: Testing → Testing Graveyard
You need to log in before you can comment on or make changes to this bug.