GIT as a Web Backup Mechanism
-
We were discussing this here in ML recently and I came across this article on backing up your website using GIT today. Thought that it was apropos. GIT is the "new" tool for this. Subversion (SVN) is the more traditional way and works fine too. Mercurial would be out there as an option.
-
@scottalanmiller said:
We were discussing this here in ML recently and I came across this article on backing up your website using GIT today. Thought that it was apropos. GIT is the "new" tool for this. Subversion (SVN) is the more traditional way and works fine too. Mercurial would be out there as an option.
I like GIT over SVN for active development because the branching and merging work easier.
For stuff that is less actively modified, it really does not matter which solution you use IMO.
I do stand by my opinion that all developed web stuff should be in a version controlled repository though. It is still code and you should have the capability of using the repo to track changes and enable reverts and such.
This does nothing to backup your databases, so it is not a full backup by any means, but the code side should be considered safe by this point.
-
Thanks for sharing. Looks pretty interesting. Not sure how this will work with our live VPS Centos server with WHM/cPanel but will be looking at it.
-
@technobabble said:
Thanks for sharing. Looks pretty interesting. Not sure how this will work with our live VPS Centos server with WHM/cPanel but will be looking at it.
Should work the same. It just grabs all of the code.
-
I guess if I setup a script to dump the database to a specific directly on some schedule, I could then ensure I have that directory included in the git commit. This would give me a database version 100% compatible with the point in time git made the commit of the rest of the stuff.