# Backup or restor of Thunderbird and/or Firefox to network



## playerofmuds (Feb 26, 2014)

Thought I would post this here as it may help a few people.
The idea is not to use the scripts as is but to see what I have done and apply similar to whatever storage destination or backup method you prefer.

When backing up and restoring Thunderbird to a new machine the profile identity may not match that of the destination.

I use the following scripts to sync my Firefox web browser and Thunderbird POP and IMAP email between two workstations for the *same user*. %USERPROFILE% is unique to the current logged in user.

When looking at these scripts keep in mind both "U:\Firefox_Thunderbird_sync\Firefox\" and "U:\Firefox_Thunderbird_sync\Thunderbird\" are existing folders on my NAS drive and should be edited to match your setup.

Robocopy is not present on all versions of windows but can be added if needed.

Key point to note is the identity used for the profiles are retained by copying the "profiles.ini" file and any change in user name by the %USERPROFILE% variable. You may also need to change this script to suit other versions of windows. I use Windows 7 pro 64bit.

If you have more than one user the script and destinations will need to vary.
Restoring to the wrong user will not overwrite the existing profile and a manual edit of the profiles.ini file can be used to reverse the process.

As with restoring of any kind, it is not always recommended to restore over the original. The renaming your profile before restoring will avoid this and only delete the renamed profile after confirming everything is ok with the restored copy.

Don't confuse the restore with the backup script. Loss of all current email, etc. will occur.

The scripts are run on the workstations and stored on the server.

Script I use to copy mail to NAS:



> :start
> @echo Mirroring Firefox and Thunderbird to Server
> robocopy %USERPROFILE%\AppData\Roaming\Mozilla\Firefox\Profiles\ U:\Firefox_Thunderbird_sync\Firefox\ /MIR /Z /fft
> copy %USERPROFILE%\AppData\Roaming\Mozilla\Firefox\*profiles.ini* U:\Firefox_Thunderbird_sync\Firefox\
> ...


Script I use to restore from NAS to any machine:


> :start
> @echo Restoring Firefox, Thunderbird to Workstation
> pause
> @echo Restoring Firefox to Workstation
> ...


----------

