hey I was about to start implementing the backup functionality, and thought that I could use some starting ideas of what we want it to be and how.
For a starter, I think we shouldn't use any of the symfony usual interface for dealing with database (doctrine tasks and the like). Everything should be web-centric.
- The user should be able to generate a backup and recover data from it at any time.
- Shall we do an "overwrite all" style backup? I mean, is the restore process meant to wipe off the actual database to restore the data contained in the backup, or it will keep the data that may already be in the database at the time of restoration?? If the latter is true, we should then find a way which records are the same in the database and the backup so we don't duplicate them.
- Here's another crazy idea: we can give the user the choice of deciding what to do with the records that exists both in the database and in the backup file:
- the backup record overwrites the database one
- the database record prevails
we can use the "id" field to determine if a record exists in both the database and the restoration file, or we could create a kind of a hash signature for every db signature that never changes once it's created and would allow us to uniquely determine one record in such cases.
- What with the format??
- Enrique, I see in the ticket description that you say
"maybe we can export to a json format (probably useful for future releases, as a way of upgrade)"
why is that? and how exactly? I'm thinking now a json file that looks alike the json format fixture files used in django projects , is that what you have in mind?