Hacker News new | ask | show | jobs
by kixpanganiban 3729 days ago
I put a client's site in a git repo once, but I never figured out how to safely and effectively git the database too. Kudos to VersionPress! I've only learned about them today but they seem to be doing a really solid job.
2 comments

Depends how often it changes. In my case I had a db that was a small number of slowly-changing configuration records (a typical web site would probably also be similar) and a large number of log records. I just serialized it once a day and checked everything but the log records into a git repo. The log records were just saved like standard syslog records in two places. Worked fine the one time we needed to restore.
sql's mysqldump CLI command locally or phpmyadmin > export produce a text based db backup in SQL and version that file in git.

If it is a huge site split the tables into separate files but 1 file is pretty good for most medium sized clients.

Git merging db's can be gnarly if changed significantly, (rollbacks are trivial).

This looks very useful and GPL just like Wordpress - excellent!

basically do the same with drupal also.