r/Enhancement • u/webchimp32 • Dec 19 '14
Simple store.json backup for Firefox in Windows
Create a file called 'store-backup.bat' in your startup folder (note 1)
Copy the following
cd <your path to simple storage> (note2)
copy /y store.json "store.json %date:~-4,4%-%date:~-7,2%-%date:~-10,2%_%time:~0,2%-%time:~3,2%-%time:~6,2%.bak"And everytime you start your computer it will make a backup of store.json with a time/date stamp
EG: 'store.json 2014-12-19_17-39-47.bak'
edit: I also added a shortcut tot the batch file on the desktop so I could trigger it when needed.
(1) Click on Windows Icon [START] > All Programs > Right-Click on Startup and select Open
(2) it will be something like
C:\Users\<USER>\AppData\Roaming\Mozilla\Firefox\
Profiles\<something>.default\jetpack\<something>@jetpack\simple-storage
16
Upvotes
5
u/aladyjewel whooshing things Dec 19 '14
Thanks! I'll link this from the 'back up your settings' wiki page.
3
u/katsumii Dec 22 '14
Hi there, thank you for this ...
I'm no programmer nor batch file user. Here's what I did. I made a new .TXT file in the Startup folder. In it, I pasted the two lines:
Then, I saved the .TXT file, closed it. Right-clicked the file and renamed it to
back-up.bat.Is this right?
Also, you may want to edit your post to look like:
cd <your path to simple storage>2because it took me about five minutes to figure out that "
^2" wasn't supposed to be included after the path to simple storage. *Blushes*How do you trigger it? Thanks!
2
u/JackCarver Dec 19 '14
But where is it saved? Can I save the backup copy automatically in my dropbox folder?
2
u/mickcarterus Apr 16 '15
Can you modify the code so that it display in the format of MM-DD-YY? It's bit difficult to follow the names of the backup file because the day is before the month. Big thanks.
3
u/aaaaaaaarrrrrgh Jun 06 '15
Note that if you have a different date/time format than OP (e.g. because you live in a different country), you'll need to adjust the file.
I also recommend using the task scheduler. This way, you can have a daily backup even if you keep your computer running.