This site will have limited functionality while we undergo maintenance to improve your experience. If an article doesn't solve your issue and you want to ask a question, we have our support community waiting to help you at @FirefoxSupport on Twitter and/r/firefox on Reddit.

Search Support

Avoid support scams. We will never ask you to call or text a phone number or share personal information. Please report suspicious activity using the “Report Abuse” option.

Learn More

Best practices for system backups?

more options

I'm taking nightly incremental backups of /home for example to my home storage server and, I guess, due to the databases Firefox uses for various storage, those can't be backed up by just copying them, if Firefox is running and has the database open.

What are the best practices, then, for ensuring all profile data, including these databases, is in a state where it can be backed up, while Firefox is running, in a way it can be restored to a fully functioning profile?

For example, with MySQL databases, you can dump the log before running the backup each night, which basically exports the SQL statements needed so you can skip backing up the actual binary database file (like ibdata1).  Does SQLite need something similar?  and is this the only special consideration that is needed, or are there other specialized types of data within our profile directories that can't be backed up by simply copying the data while Firefox is running?

Thanks

I'm taking nightly incremental backups of /home for example to my home storage server and, I guess, due to the databases Firefox uses for various storage, those can't be backed up by just copying them, if Firefox is running and has the database open. What are the best practices, then, for ensuring all profile data, including these databases, is in a state where it can be backed up, while Firefox is running, in a way it can be restored to a fully functioning profile? For example, with MySQL databases, you can dump the log before running the backup each night, which basically exports the SQL statements needed so you can skip backing up the actual binary database file (like ibdata1).  Does SQLite need something similar?  and is this the only special consideration that is needed, or are there other specialized types of data within our profile directories that can't be backed up by simply copying the data while Firefox is running? Thanks

All Replies (2)

more options

I've always just copied mine and the copies have worked fine when copied back.

Helpful?

more options

Yes, well, that has typically worked in the past, but not so much anymore with these fancy databases.  I didn't even need a backup, I just copied my profile folder over to the new computer.  Thing is, places.sqlite was secretly corrupted at some point but I was never alerted to this. Everything has appeared and worked fine, my history is all viewable in the old Firefox, nightly backups have been successful, and so on.

Yet, only 12 history items found?  Then upon checking integrity in about:profiles the truth was revealed, it was a complete mess. Also tried Firefox Sync, same thing only 12 entries synced.  I finally had success with Skyweb's History Export add-on, it was able to grab over 138,000 records and export to json which i was able to import into this new computer.

For databases, in general, it's a bad practice to just plain file copy them while they're still open.  Yes, if it's got little to no usage when the copy is performed, you can get lucky and not have issues with restoration. But with these one like places.sqlite that stores all kinds of things besides history, there's no telling when a transaction might be written. The databases have to be backed up in special ways.

Now I'm reading more about different ways that can be executed before my nightly backup runs: .clone, .dump, .backup.  An app called Litestream looks to be the best, it looks like it can dump incremental backups of sqlite database which can then be included in nightly system/home incremental backups... will keep reading.

Helpful?

Tanya soalan

You must log in to your account to reply to posts. Please start a new question, if you do not have an account yet.