You are here
Jason - Sat, 2021/07/03 - 16:28
TKLBAM is backing up the old TRAC host. I've built a new host and the restore on it completes, but when I navigate to the TRAC project page the three links have errors;
- Clicking git-helloworld returns an internal server error
-
hg-helloworld isn't a link, and has the error text;
-
hg-helloworld: Error
(No Trac environment found at /var/local/lib/trac/hg-helloworld [Errno 2] No such file or directory: '/var/local/lib/trac/hg-helloworld/VERSION')
-
hg-helloworld: Error
-
svn-helloworld isn't a link, and has the error text;
-
svn-helloworld: Error
(The Trac Environment needs to be upgraded. Run: trac-admin "/var/local/lib/trac/svn-helloworld" upgrade
-
svn-helloworld: Error
On the new host,
-
/var/www/projects/hg-helloworld/ contains
- conf db files
-
/var/www/projects/svn-helloworld/ contains
- README VERSION conf db htdocs log plugins templates
-
/var/www/projects/git-helloworld/ contains
- README VERSION conf db htdocs log plugins templates
How do I fix this?
Forum:
Hi Jason.
Firstly, those "helloworld" repos are only intended as examples so they don't really provide much value beyond seeing what the appliance is capable of when you first install it. So personally, I would recommend that you just focus on the Trac site you are using for your code and ensuring that works properly.
So if you'd like to share a bit more about that, then hopefully I migh be able to offer some more specific and targeted assistance.
In the meantime, to specifically respond to your questions/feedback:
#1 - IIRC the gitweb config has changed quite a bit so excluding the relevant parts from your backup (or possibly better still, just including the bits you need) will probably resolve that issue>
#2 Mercurial (hg) is no longer supported in the current appliance, so that explains why that is not working.
#3 My guess is that running the command recommended in the error message will likely resolve that issue.
Hi Jeremy.
Hi Jeremy.
hg-helloworld has all my content. I never created another project. I'm not overly worried about the svn or git aspects - I'd just like my wiki pages and tickets to come through the upgrade from 1.0.2 to v14.
What details can I provide that will help?
Does it matter that tklbam-restore hasn't put the various files into /var/www/projects/hg-helloworld/ ? (and why wouldn't it do that?)
Thanks,
Jason.
Just to clarify, you're moving to v14.x?
For what it's worth, the latest release of the TurnKey Revision Control appliance is v16.1. I assume that you mean that you are moving from v14.x to v16.1!? Or do I completely misundersand?
Assuming that I'm right and you're trying to migrate a v14.x server to v16.1; then the first thing you'll need to do if you're using Mercurial, is install the mercurial package. I.e. something like this:
As for why TKLBAM isn't repopulating the /var/www/projects/hg-helloworld/ directory, I'm not at all sure?! I suggest that you double check that it is actually includes those files in the backup.
Assuming that you still have the original server, then you can check by running a simulation. Like this:
Then have a poke around in the /TKLBAM directory (the contents are relative to '/', i.e. your /var/www/projects/hg-helloworld/ directory should be /TKLBAM/var/www/projects/hg-helloworld/
Alternatively, on the v16.1 server, you can dump the backup (without actually restoring it) like this:
Where 'BACKUP_ID' is the actual backup ID number of your backup. Then you should find the contents of /var/www/projects/hg-helloworld/ in /tklbam-dump/var/www/projects/hg-helloworld/
Also, if I recall correctly, I think there were a few bugfix releases of TKLBAM within the lifetime of v14.x. To ensure you have the latest (on your old v14.x server) run this:
Thinking about this a bit more, perhaps another way of upgrading might be to do an "in place" Debian upgrade? TurnKey v14.x was based on Debian 8/Jessie. TurnKey v15.x was based on Debian 9/Stretch and TurnKey v16.x is based on Debian 10/Buster. So you would first need to upgrade your v14.x to a Debian Stretch base (see also the full Stretch release notes), then to a Debian Buster base (see also the full Stretch release notes).
Be sure to make a copy/snapshot of your old server before you do that though, just in case something goes wrong and you need to roll back.
Jeremy,
Jeremy,
You're right - it is v14.1. The first trac ticket was created in August 2016, so it's been running for a little while (and it is still running fine - it's just that I'd like to update it, and that's proving difficult).
It appears that TKLBAM isn't backing up the directories - there isn't a /TKLBAM/var directory.
I've enclosed a listing of the /TKLBAM test restore directory, the some of the config files, and the backup output below, (which is quite long, but hopefully has enough detail to be helpful).
Thank you for your time helping with this.
Version
TKLBAM Simulate Directory Listing
Config Files
/etc/tklbam/conf
/etc/tklbam/overides
/var/lib/tklbam/profile/dirindex.conf
Backup output
Strange?! It is listing /var/local/lib/trac/hg-helloworld ?!
Looking at what you've posted there, it appears that you are using the default config. The profile includes /var/local/lib/trac/hg-helloworld and the simulation output suggests that it is collecting all the files from /var/local/lib/trac/hg-helloworld. It's strange that it's not there in the /TKLBAM directory though?!
I did notice that there was an incomplete backup that had failed or been interrupted though. So perhaps you viewed the /TKLBAM dir before running the simulation? Is that possible?
Regardless, if you haven't already be sure to make sure that you have the latest version of TKLBAM (i.e. 'apt -get update && apt-get install -y tklbam').
Actually looking a bit closer, it appears that there is a newer(?)/additional version of Trac installed (or at least unpacked) in /root/trac.1.0.2?! Do you know anything about that?
The default profile makes
The default profile makes sense - I try not to customise things too much.
Restoring the backup, updating permissions, and running trac-admin upgrade now gives an Internal Server Error.
I think that /root/trac.1.0.2 might be a manual backup/copy. TKLBAM is up to date.
tklbam-restore 2
apt-get update && apt-get install -y tklbam
Did you install mercurial?
Did you install mercurial? If not, I suspect that may be the issue (and if it's not THE issue, it is definitely A issue). To do that:
And there is actually some Apache config that we'll need. To create that:
And we'll also need to enable that in the main Apache site file:
Then restart Apache:
Also I did notice in the output that there is also a recommendation to update the documentation. I.e.:
So I suggest that you also run that.
Before you check it again, I suggest clearing out all the Apache logs:
Now check it again now. If it still errors, then hopefully more detailed info will be towards the end of the Apache error log (/var/log/apache2/error.log or perhaps one of the other log files in there). Please feel free to post relevant bits here for further assistance.
Mercurial is installed and is
Mercurial is installed and is the most recent version. There isn't a /etc/apache2/conf/ directory - should I create it, or did you mean something else? (I don't have a revisioncontrol.conf file either).
If I navigate to http://trac-02/hg-helloworld, the following is logged in /var/log/apache2/error.log
I'm so sorry for such a slow reply...
I'm not sure what happened as I'm sure that I replied to you ages ago. Obviously not...
Anyway, for some reason in my last response, I had in my head that this was the revision control appliance rather than Trac. That's why it didn't work... Deep apologies about that.
So looking a bit closer, it appears that in Debian Buster (latest 'stable'; basis of v16.x) Trac is v1.2.3. But the Trac Mercurial plugin that we were using is no longer packaged (the last release that included trac-mercurial was in Debian 8/Jessie - the basis of v14.x).
It does still appear though that the trac-mercurial plugin is still being developed. So that's something. In the releases and compatibility matrix it appears it should in theory be compatible. In Debian 10/Buster (basis of v16.x) Mercurial is v4.8.2 and as noted above, Trac version is v1.2.3. So the latest v1.0.0.9 TracMercurial plugin should be compatible (Trac support includes v1.2.x, Mercurial support includes v1.1.x to v5.1).
Unfortunately though, I'm not completely clear how you would install that into Trac installed via Debian packages. Unfortunately, it's so long since the trac-mercurial was packaged in Debian that I can't find the old package source to be able to get a better understanding of what might be required.
The TracMercurial docs note that you can install it via pip. I.e. this should hopefully work:
Hopefully that "just works" with your existing config!?! If not, then there is a fair bit more info on the TracMercurial plugin page. Hopefully that might help a bit? if you continue to have issues, please share any new error messages you encounter. Please also note what you've done (if you do any more specifics). If you need more help, please also provide an updated Apache log (after browsing to the URL).
Good luck and apologies again about the really slow response.
Add new comment