Results 1 to 4 of 4
  1. #1
    Uranium Lounger CWBillow's Avatar
    Join Date
    Jul 2002
    Location
    Las Vegas, NV USA
    Posts
    6,577
    Thanks
    89
    Thanked 13 Times in 12 Posts

    Firefox Quantum Profile backup

    I want a batch file that I can use to back up my Firefox profile that will NOT overwrite the existing backups. I had thought this should be relatively straight forward, but I keep getting errors.

    If the path to my profile is C:\Users\OL Man\AppData\Local\Mozilla\Firefox\Profiles\pmhirpm 0.default, then my backup file, run from c:\, I thought would be

    C:
    CD %appdata%\Mozilla\Firefox\Profiles\pmhirpm0.defaul t
    copy pmhirpm0.default

    which is OK, but I want it to keep all copies, numbering them I guess.

    What would the command then be?
    Chuck Billow
    -------------------------------------------------
    "Good judgment comes from experience, and experience - well, that comes from poor judgment."

    ~ A(lan) A(lexander) Milne (1882-1956)- "House at Pooh Corner"

  2. #2
    Uranium Lounger CWBillow's Avatar
    Join Date
    Jul 2002
    Location
    Las Vegas, NV USA
    Posts
    6,577
    Thanks
    89
    Thanked 13 Times in 12 Posts
    It occurred to me that I used to back up my Firefox using MozBackup. It had always worked well for me, so I went looking for any updates.

    As usual there were those that swear by MozBackup, but I also read a comment by the developer that basically said, "you may have problems, but do not come to me..."

    Well...!

    Two questions/options: Can't I just back up the profile folder? Isn't that where everything is stored? If that is the case, couldn't I then,\ by batch file or backup software, just back up that folder?
    Chuck Billow
    -------------------------------------------------
    "Good judgment comes from experience, and experience - well, that comes from poor judgment."

    ~ A(lan) A(lexander) Milne (1882-1956)- "House at Pooh Corner"

  3. #3
    WS Lounge VIP
    Join Date
    Dec 2009
    Location
    Earth
    Posts
    8,916
    Thanks
    63
    Thanked 1,115 Times in 1,037 Posts
    You can backup via your backup software. Just include the profile folder.
    Alternatively you can backup with a batch file, but you need to create a date folder for the files first.

    cheers, Paul

    Code:
    @echo off&SETLOCAL
    
    :: This will return date into environment vars
    :: Works on any NT/2K/XP machine independent of regional date settings
    :: 20 March 2002
    :: This works by taking advantage of a quirk in the date command 
    :: first noticed by Michael Jerkovic - the DATE command will display something like:
    :: The current date is: Fri 14/04/2000
    :: Enter the new date: (dd-mm-yy)
    :: The useful bit there is the (dd-mm-yy), on a machine with different 
    :: regional settings it may appear as (mm-dd-yy)
    
    FOR /f "tokens=1-4 delims=/-. " %%G IN ('date /t') DO (call :s_fixdate %%G %%H %%I %%J)
    goto :s_print_the_date
    
    :s_fixdate
    if "%1:~0,1%" GTR "9" shift
    FOR /f "skip=1 tokens=2-4 delims=(-)" %%G IN ('echo.^|date') DO (
       set %%G=%1&set %%H=%2&set %%I=%3)
    goto :eof
    
    :s_print_the_date
    echo Month:[%mm%]  Day:[%dd%]  Year:[%yy%]
    
    rem We need a directory for the backup. Use the date in the form YYYMMDD
    md D:\Backup\%yy%%mm%%dd%
    
    rem Now copy the profile to our new directory. Include subdirectories.
    xcopy "%appdata%\Mozilla\Firefox\Profiles" "D:\Backup\%yy%%mm%%dd%" /s

  4. #4
    Uranium Lounger CWBillow's Avatar
    Join Date
    Jul 2002
    Location
    Las Vegas, NV USA
    Posts
    6,577
    Thanks
    89
    Thanked 13 Times in 12 Posts
    Quote Originally Posted by Paul T View Post
    You can backup via your backup software. Just include the profile folder.
    Alternatively you can backup with a batch file, but you need to create a date folder for the files first.

    cheers, Paul

    Code:
    @echo off&SETLOCAL
    
    :: This will return date into environment vars
    :: Works on any NT/2K/XP machine independent of regional date settings
    :: 20 March 2002
    :: This works by taking advantage of a quirk in the date command 
    :: first noticed by Michael Jerkovic - the DATE command will display something like:
    :: The current date is: Fri 14/04/2000
    :: Enter the new date: (dd-mm-yy)
    :: The useful bit there is the (dd-mm-yy), on a machine with different 
    :: regional settings it may appear as (mm-dd-yy)
    
    FOR /f "tokens=1-4 delims=/-. " %%G IN ('date /t') DO (call :s_fixdate %%G %%H %%I %%J)
    goto :s_print_the_date
    
    :s_fixdate
    if "%1:~0,1%" GTR "9" shift
    FOR /f "skip=1 tokens=2-4 delims=(-)" %%G IN ('echo.^|date') DO (
       set %%G=%1&set %%H=%2&set %%I=%3)
    goto :eof
    
    :s_print_the_date
    echo Month:[%mm%]  Day:[%dd%]  Year:[%yy%]
    
    rem We need a directory for the backup. Use the date in the form YYYMMDD
    md D:\Backup\%yy%%mm%%dd%
    
    rem Now copy the profile to our new directory. Include subdirectories.
    xcopy "%appdata%\Mozilla\Firefox\Profiles" "D:\Backup\%yy%%mm%%dd%" /s
    Thanks, Paul!
    Chuck Billow
    -------------------------------------------------
    "Good judgment comes from experience, and experience - well, that comes from poor judgment."

    ~ A(lan) A(lexander) Milne (1882-1956)- "House at Pooh Corner"

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •