I’ve already looked at this question and didn’t find it too helpful.
We’re using WordPress as a CMS that also includes a blog/news section. The blog/news uses WP “posts” and those are made whenever and are j
We’re already using version control for the files, so that’s simple enough. The main issue is the database. We basically want a selective backup that excludes posts. Are there any best practices or well tested ways to do this?
I’m comfortable enough with sql (not specifically MySql, but the dialects are similar enough I’d think) that I could come up with a script to do it, but I’d rather not risk subtle errors if there’s already a well-tested solution available.
If there isn’t already a solution, are there any caveats or pitfalls I should be aware of when doing this? Any relevant articles that would be helpful in preparing this?
It’s a hard problem to solve. Would this answer be any more helpful?
I know it’s not a perfect solution, but it is a start.
P.S. I’m working with some others to solve the bigger problem with a plan to release as part of a GPL-licensed product. We are looking for people who have this need to help us define the requirements. If you are interested in detailing your specific needs and letting me or others ask you some more detailed questions please contact me via the email in my profile. We just don’t want to build something and then find out it’s not what people want or need.
You might want to look at mysqldump. I haven’t used it so I can’t vouch for ease-of-use, but it’s a mysql utility for copying DBs, and it has an “ignore-table” option that lets you skip tables.
Another approach might be to copy the DB in full, but have a script that runs immediately after the backup that cleans out the post table.