Pale Moon profile backup tool

For discussions about side projects, potential future projects or helper applications for Pale Moon.
User avatar
Moonchild
Pale Moon guru
Pale Moon guru
Posts: 35402
Joined: 2011-08-28, 17:27
Location: Motala, SE
Contact:

Pale Moon profile backup tool

Unread post by Moonchild » 2012-05-06, 18:40

For people wanting an easy way of backing up their Pale Moon profiles (single click), I've created a simple profile backup tool.

Development of this tool is very slow. I'm working on trying to make a proper encryption for it, but it's proving to be tricky because of limits of the compression tool. MozBackup was supposed to add support for Pale Moon but that tool seems all but abandoned by now. :thumbdown:

The program uses Igor Pavlov's 7-zip Open Source compression tool to compress the backups (by default, but compression can be disabled). There is no password protection built into this tool.

It's meant for basic desktop installations only. Portable browser users don't need it, they can simply copy their browser&profile somewhere safe.
People with custom profile paths probably don't need it, they are likely to have profiles stored in an easy to use/copy location already anyway.
Once again: this will only work for default, desktop installations!

Options:
  • Compression: uses 'normal' 7z compression, decent speed and not too power-hungry. No compression if disabled (very fast copy).
  • Overwrite: Overwrites/updates the backup if one was already made that day. When checked, only one (_00) backup per date will be stored. When unchecked, will number backups incrementally.
  • Show command window: When checked, it shows the command window of the 7-zip packer as it works. This is disabled by default and included mainly for people wanting extensive detail or for troubleshooting.
Interface:
  • Refresh icon: refreshes the list with backups.
  • Folder icon: opens an explorer window in the folder where the backups are stored (to delete, manage, etc.).
  • Backup: simply hit the button to make a backup.
  • Restore: select one of the backups in the list, and hit restore to restore the profile.
  • Set backup path, Options, Exit: self-explanatory.
NOTE: at the time of this writing, some AV programs may flag this program as a "Generic trojan". These are false positives on the rapid application builder package used to create this tool.

Current version: 1.1.1.417
SHA-256: 11de0872c1ea957404212369e3917c5221e5abca4af9dbd3aaffe83e0d48c1d4
File Size: 1,306,112 Bytes
Download link: http://relmirror.palemoon.org/tools/pmbackup.exe

Simply save it in a write-enabled location (it won't work from read-only media) and run it. No install/uninstall is needed - once you're done with it you can simply delete it.
Upon first run, it will extract the 7-zip packer, and create a settings file to remember the options you choose (including backup path).

Technical note: *.pmbackup files are regular 7-zip archives, but given this extension to keep the program from offering restores of non-backup archives. If you want to manually work with these in 7-zip, rename them to *.7z
Last edited by Moonchild on 2015-01-23, 21:29, edited 7 times in total.
Reason: Updated version and download/description
"Sometimes, the best way to get what you want is to be a good person." -- Louis Rossmann
"Seek wisdom, not knowledge. Knowledge is of the past; wisdom is of the future." -- Native American proverb
"Linux makes everything difficult." -- Lyceus Anubite

dark_moon

Re: Pale Moon profile backup tool

Unread post by dark_moon » 2012-05-06, 19:12

Nice job. Works fine under win7 x64

jumba

Re: Pale Moon profile backup tool

Unread post by jumba » 2012-05-08, 16:18

Thanks, very handy tool to create a profile backup!

I have used winrar to create backups of my pm and thunderbird profiles with a batch file. Here's the batch file if anyone needs a command line version. It can also be used to update the backup files to synchronize the contents between profile and archive. Paths and file names are defined at the beginning and of course it only works with WinRAR installed! ;)

Code: Select all

@echo off
set BackupPath=C:\Backups
if not exist "%BackupPath%" mkdir "%BackupPath%"
set ProfilePath1=C:\Users\administrator\AppData\Roaming\Moonchild Productions\Pale Moon
set ProfilePath2=C:\Users\administrator\AppData\Roaming\Thunderbird
set BackupFile1=%BackupPath%\Palemoon_profile.rar
set BackupFile2=%BackupPath%\Thunderbird_profile.rar

if not exist "%ProfilePath1%" (
echo Path for profile1 not set or incorrect!
goto profile2
)
if exist "%BackupFile1%" (
echo Updating backup file for profile1 ..
) else (
echo Creating backup file for profile1..
)
start /wait winrar a -u -as -ep1 -r -ibck "%BackupFile1%" "%ProfilePath1%"\*
echo done.
:profile2
if not exist "%ProfilePath2%" (
echo Path for profile2 not set or incorrect!
goto end
)
if exist "%BackupFile2%" (
echo Updating backup file for profile2..
) else (
echo Creating backup file for profile2..
)
start /wait winrar a -u -as -ep1 -r -ibck "%BackupFile2%" "%ProfilePath2%"\*
echo done.
:end
pause
Last edited by jumba on 2012-05-09, 10:17, edited 1 time in total.

dark_moon

Re: Pale Moon profile backup tool

Unread post by dark_moon » 2012-05-08, 18:51

I have a batch too, but without so much code:

Code: Select all

@echo off
F:\7-Zip\7zG a "%temp%\Pale Moon_%date%.7z" "C:\Users\username\AppData\Roaming\Moonchild Productions\Pale Moon\Profiles\random.default"
copy /V "%temp%\Pale Moon_%date%.7z" "X:\Backup">nul
7-Zip is better then winrar and opensource

User avatar
Moonchild
Pale Moon guru
Pale Moon guru
Posts: 35402
Joined: 2011-08-28, 17:27
Location: Motala, SE
Contact:

Re: Pale Moon profile backup tool

Unread post by Moonchild » 2012-05-09, 07:39

dark_moon wrote:7-Zip is better then winrar and opensource
Even more so, WinRAR is commercial, you have to buy a license after the trial period has ended if you continue using it.
"Sometimes, the best way to get what you want is to be a good person." -- Louis Rossmann
"Seek wisdom, not knowledge. Knowledge is of the past; wisdom is of the future." -- Native American proverb
"Linux makes everything difficult." -- Lyceus Anubite

jumba

Re: Pale Moon profile backup tool

Unread post by jumba » 2012-05-09, 10:14

interesting.. 7-zip's "7zG u -uq0" should be equivalent to winrar's "winrar a -u -as", which does the synchronous updating. Time to move to use 7-zip! :)
It still lacks some of few features that I miss from winrar, though..

User avatar
Moonchild
Pale Moon guru
Pale Moon guru
Posts: 35402
Joined: 2011-08-28, 17:27
Location: Motala, SE
Contact:

Re: Pale Moon profile backup tool

Unread post by Moonchild » 2015-01-23, 21:30

Updated the to to 1.1.1 for better naming of the backup files (leading zeroes and now handling proper naming of more than 10 backups/day, if you're that paranoid about data corruption ;) )
"Sometimes, the best way to get what you want is to be a good person." -- Louis Rossmann
"Seek wisdom, not knowledge. Knowledge is of the past; wisdom is of the future." -- Native American proverb
"Linux makes everything difficult." -- Lyceus Anubite

Locked