I'm about to start a new Drupal app (my first one) and would like to have some version control - not just of the source code, but also of the database.
Has anyone had any experience of that? Do I have to manually take DB snapshots and include them in the versions, or is there a better way?
The Backup & Migrate module. :thumbsup:
Install it, then set up a cron job. Make it part of your default installation profile.
thanks, that'll probably come in handy later on, but what I need now is a versioning plan to aid in the development of the site - e.g. to log the changes in the database structure as things are added etc, as well as logging the source code changes. Like you can do the source code part with subversion for instance, but what about the database structure? I'm not too well versed in subversion to be honest, used it but not set it all up.
Okay. B&M exports the DB as SQL and/or txt files, so you should not have any problem as long as the destination folder (usually deploy/sites/default/files/backup-and-migrate/) is versioned. During development I will run backups manually (backup, then commit) and in production set up a cron job to run on a schedule.
Is that in line with what you wanted?
hmm ok, sound like it might do the trick. A roll back would involve taking the db text file out of that folder and overwriting the db with it I guess.
Not necessarily. B&M provides the ability to roll back to any previously saved version:
admin/content/backup_migrate/restore "Restore Database" select the file to which you want to roll back from the "saved backups" directory voila!
So yeah, technically the DB is getting overwritten but that is unavoidable. The main benefit comes in terms of making the workflow relatively seamless.
gonna have to give this a whirl I think, thanks Baron.
:thumbsup: