You are here
Moving forward in the world of things I have to do now...
Note to self - fail more and you will have less to learn...
We have gotten out WordPress site (TKL WordPress on Hyper-V) up and functional and now we need to tweak performance to make the SEO consultant (witch doctor) happy. But before I go crazy adding plu-ings as requested I figured a good granular backup and recovery solution made sense. I know TKLBAM, but powers that be want on premise only. I use Updraft on the sly to make bulk backups but looks like I need Git to get the good stuff. I was looking at Revisr plug-in but don't want to ship to GitHub. I see that Git is in the TKL WordPress and I did check this link on How to setup Git but that applies to Redmine. I plan on using GitHub's Window client to mange Git but at the moment I am lost. I have a repo at /srv/repos/git/wordpress.git/ and based on this article (haacked.com) if I can get the HTTPS clone URL I can link Windows client.
I am looking at MAN GIT-INSTAWEB and MAN GITWEB to setup what I need. If anyone has experience doing this let me know else I will document my atttempt here.
Thanks
git instaweb command
Per MAN GITWEB the way to setup GITWEB is to run git-instaweb from your repository location.
Repo path: /srv/repos/git/
Parameters set in Global via git config --global -e
Apache Directives - /etc/apache2/sites-enabled/git
(Did setup folder option via default server & but nothing set there)
Set Privilages - chown -R www-data:www-data /srv/repos/git/
All for now.
Update - close but not their yet
Virtual host in Apache set to git-http-backend - error in Apache log, not the Git virtual host but the default server log.
fatal: Not a git repository (or any of the parent directories): .git
Previously I did an init @ /srv/repos/git/ by "git init --bare --shared wordpress.git"
If I do a git status when not in the wordpress.git folder, same error.
If in wordpress.git path I get fatal: This operation must be run in a work tree
Bare = no work tree (dummy!)
Then
cd /srv/repos/git/wordpress.git
git config --bool core.bare false
git config --path core.worktree /srv/repos/git/wordpress.git
Added new files
git add .
git commit
Now git show:
root@www git/wordpress.git# git show
commit 1b943b961f2f7907dac334f50a58d03e51531780
Author: root <root@www.inteltech.com>
Date: Tue Feb 3 17:49:28 2015 -0500
Initial commit of blank repository wordpress.git
diff --git a/HEAD b/HEAD
new file mode 100644
index 0000000..cb089cd
--- /dev/null
+++ b/HEAD
@@ -0,0 +1 @@
+ref: refs/heads/master
diff --git a/config b/config
new file mode 100644
index 0000000..86a67d8
--- /dev/null
+++ b/config
@@ -0,0 +1,8 @@
+[core]
+ repositoryformatversion = 0
+ filemode = true
+ bare = false
+ sharedrepository = 1
+ worktree = /srv/repos/git/wordpress.git/
+[receive]
+ denyNonFastforwards = true
diff --git a/description b/description
new file mode 100644
index 0000000..498b267
--- /dev/null
+++ b/description
@@ -0,0 +1 @@
+Unnamed repository; edit this file 'description' to name the repository.
diff --git a/gitweb/apache2.conf b/gitweb/apache2.conf
new file mode 100644
index 0000000..510ff5a
--- /dev/null
+++ b/gitweb/apache2.conf
@@ -0,0 +1,20 @@
+ServerName "git-instaweb"
+ServerRoot "/usr/share/gitweb"
+DocumentRoot "/usr/share/gitweb"
+ErrorLog "/srv/repos/git/wordpress.git/gitweb/apache2/error.log"
+CustomLog "/srv/repos/git/wordpress.git/gitweb/apache2/access.log" combined
+PidFile "/srv/repos/git/wordpress.git/pid"
+Listen 12399
+LoadModule mime_module /usr/lib/apache2/modules/mod_mime.so
+LoadModule dir_module /usr/lib/apache2/modules/mod_dir.so
+LoadModule env_module /usr/lib/apache2/modules/mod_env.so
+TypesConfig "/srv/repos/git/wordpress.git/mime.types"
+DirectoryIndex gitweb.cgi
+LoadModule cgi_module /usr/lib/apache2/modules/mod_cgi.so
+PassEnv GIT_DIR
+PassEnv GIT_EXEC_PATH
+PassEnv GITWEB_CONFIG
+AddHandler cgi-script .cgi
+<Location /gitweb.cgi>
+ Options +ExecCGI
+</Location>
diff --git a/gitweb/apache2/access.log b/gitweb/apache2/access.log
new file mode 100644
index 0000000..e69de29
diff --git a/gitweb/apache2/error.log b/gitweb/apache2/error.log
new file mode 100644
index 0000000..4b7219d
--- /dev/null
+++ b/gitweb/apache2/error.log
TBH I have no experience with any of that stuff...
But I have a couple of points to make.
Firstly, TKLBAM can be used with local storage (although it's nowhere near as cool when not linked to the Hub). Have a read here. FWIW TKLBAM can actually support tons of different targets and protocols...
Secondly, I'm not sure about any pretty UI for it, but the easiest way to put your WP into a git repo is to simply initialise the directory as a git repo. E.g.:
To make it auto commit I guess you could set up a cron job to do daily commits. Also to make the backup complete you'd probably also want to dump the DB. You could do that with a cron job too (and if you did the dump to the /var/www/wordpress it could be in the git repo too).Regardless, thanks for sharing your process and progress! :)
Add new comment