Our backup mechanism is designed to work for the JumpBox as shipped. It will not necessarily cover arbitrary changes you make on the JumpBox and is likely to fail in the event that you change too much in the JumpBox. I should have made that explicitly clear in my instructions above. We only support the JumpBox as shipped and don't support third party plugins, extensions or any modification you may make to the JumpBox on the command line. It wouldn't even make sense to use the JumpBox mechanism since the restore mechanism wouldn't be designed to handle a backup you create.
All of that said, your best bet at this point would be to roll your own backup script. Trac and subversion (as installed on the JumpBox) save all of their state in their project directories. Both provide a hot-copy mechanism to do backups. This will perform the necessary locking and make exact duplicates of the directories specified. A simple bash script that does the svn hotcopies and the trac hotcopies plus a copy of the JumpBox to restore to are all you need.
Submitted by dcolebatch on Tue, 02/12/2008 - 9:39am.
Well - for those who can't wait, you can hack /jumpbox/lib/apputils.rb a little.
See line 116: AppUtils.dump_subversion("/var/data/projects/svn/project/","#{dumpdir}/svndump")
AppUtils.dump_trac("/var/data/projects/trac/project/", "#{dumpdir}/tracdump")
Now, modify these lines to match your repo location and trac installs: AppUtils.dump_subversion("/var/data/projects/svn/proj1/","#{dumpdir}/svn_proj1_dump")
AppUtils.dump_subversion("/var/data/projects/svn/proj2/","#{dumpdir}/svn_proj2_dump")
AppUtils.dump_trac("/var/data/projects/trac/proj1/", #{dumpdir}/trac_proj1_dump")
AppUtils.dump_trac("/var/data/projects/trac/proj2/", #{dumpdir}/trac_proj2_dump")
Also, you need to skip down to around line 166 and change this: extra_files = "/var/data/projects/trac.passwd /var/data/projects/svn/project/hooks/"
to something like this: extra_files = "/var/data/projects/trac.passwd /var/data/projects/svn/proj1/hooks/ /var/data/projects/svn/proj2/hooks"
:: RESTORATION ::
The restore method (AppUtils.restore_trac_subversion(restore_version)) also needs to be modified. (Line 57 ish)
Submitted by dcolebatch on Tue, 02/12/2008 - 3:29pm.
I have tested a backup and restore using the trac JumpBox v1.0.2b (Both for the backup and the restore) and this works perfectly.
Just remember, you have to backup your modified /jumpbox/lib/apputils.rb independently and restore it to the new VM before attempting to run the restore.
Submitted by jrobgood on Thu, 01/10/2008 - 7:19pm.
I've had great success doing this with these instructions. I also added the TracProjectMenu 1.0 plugin for a pretty smooth repo.
My only problem is that the User Accounts, while consistent between both contexts, lose their email address and name info in the additional contexts (trac instances)
Sorry, that additional info is stored in that specific Trac instance, I haven't seen anything that would sync that type of information between instances. If you see anything to the contrary let me know. Also, thanks for pointing out the TracProjectMenu plugin. That looks useful, I will play with it when I get a chance.
Submitted by jrobgood on Wed, 03/19/2008 - 5:48pm.
I know this is a Trac question and not a JumpBox question, but do you think it's safe to drop and re-add those users whose data is partially lost in the user admin for each Trac instance?
Ok i solved the problem.
I have only one .htpasswd for the users so i thought every user who is TRAC_ADMIN in a project is admin for the other project too. I thought that permissions would be bequeath, but they dont.
So i tried to set the permission manual and now it works.
Hi i created a new trac-project and it works and i have also the Login function. But in the new project the webadminplugin is missing.
I tried to install the webadminplugin in the /usr/share/trac/plugins folder but it dosen't work. The rights a already set to www-data and the plugin is enabled in the gloabel trac.ini --> /usr/share/trac/conf . How can i solve this problem?
Note, the sudo trac-admin line above should be continued on one line where it is indented or you can put backslashes at the end of the continued lines. The forum software wont let me post backslashes.
NOTICE - JumpBox does not support modifications made to the JumpBox on the command line. While, you are free to try this, proceed with caution because we won't be able to help in the event of trouble.
After you have registered if you want a new SVN and Trac project you can do the following as admin:
The Trac project should work but will be missing plugins and the JumpBox navbar if you access it via http://host/projects/project2/. To access your new SVN repository you will need to edit the dav_svn.conf file:
Update - Check my later comment below for the exciting conclusion! Also, I have updated some of the formatting and removed some of the extraneous double quotes above.
Yeah, those instructions are incomplete, the trac.ini for project2 needs to be updated. Its probably easiest to just copy the old one and update the name and repository_dir settings so they are correct.
sudo cp /var/data/projects/trac/project/conf/trac.ini /var/data/projects/trac/project2/conf/trac.ini
sudo nano /var/data/projects/trac/project2/conf/trac.ini
# now fix name and repository_dir
sudo /etc/init.d/apache2 restart
The last thing you will need to do is grant the admin user TRAC_ADMIN permissions on the new trac project:
This should allow all of your other project users to log into this project and make the admin user an administrator in this project. This should cover most people's needs. All of this assumes you want the two Trac instances to be pretty much the same and share users, otherwise, mucking with the trac.ini is left as an exercise to the reader.
The easiest way is to just run a separate Trac JumpBox for the new project. That's obviously fairly resource heavy but it's easy and it's really the way this JumpBox is intended to be used.
That said there's nothing that prevents you from registering the JumpBox, enabling shell access and then adding a new Trac project the way you would with any Trac installation.
What about backups?
I have been able to create two projects.
They run well in:
host.name/projects/proj1
host.name/projects/proj2
I also created two svn repo's
/var/data/projects/svn/proj1
/var/data/projects/svn/proj2
But now the backup fails through the web interface:
"Subversion Dump Failed"
Is there some logging that the backup script does to help me debug this?
Rgds,
David
What about backups?
Our backup mechanism is designed to work for the JumpBox as shipped. It will not necessarily cover arbitrary changes you make on the JumpBox and is likely to fail in the event that you change too much in the JumpBox. I should have made that explicitly clear in my instructions above. We only support the JumpBox as shipped and don't support third party plugins, extensions or any modification you may make to the JumpBox on the command line. It wouldn't even make sense to use the JumpBox mechanism since the restore mechanism wouldn't be designed to handle a backup you create.
All of that said, your best bet at this point would be to roll your own backup script. Trac and subversion (as installed on the JumpBox) save all of their state in their project directories. Both provide a hot-copy mechanism to do backups. This will perform the necessary locking and make exact duplicates of the directories specified. A simple bash script that does the svn hotcopies and the trac hotcopies plus a copy of the JumpBox to restore to are all you need.
Check out the trac hotcopy documentation:
http://trac.edgewall.org/wiki/TracBackup
and the SVN backup documentation:
http://svnbook.red-bean.com/en/1.4/svn.reposadmin.maint.html#svn.reposad...
Good luck,
Austin
RE: What about backups
Well - for those who can't wait, you can hack /jumpbox/lib/apputils.rb a little.
See line 116:
AppUtils.dump_subversion("/var/data/projects/svn/project/","#{dumpdir}/svndump")
AppUtils.dump_trac("/var/data/projects/trac/project/", "#{dumpdir}/tracdump")
Now, modify these lines to match your repo location and trac installs:
AppUtils.dump_subversion("/var/data/projects/svn/proj1/","#{dumpdir}/svn_proj1_dump")
AppUtils.dump_subversion("/var/data/projects/svn/proj2/","#{dumpdir}/svn_proj2_dump")
AppUtils.dump_trac("/var/data/projects/trac/proj1/", #{dumpdir}/trac_proj1_dump")
AppUtils.dump_trac("/var/data/projects/trac/proj2/", #{dumpdir}/trac_proj2_dump")
Also, you need to skip down to around line 166 and change this:
extra_files = "/var/data/projects/trac.passwd /var/data/projects/svn/project/hooks/"
to something like this:
extra_files = "/var/data/projects/trac.passwd /var/data/projects/svn/proj1/hooks/ /var/data/projects/svn/proj2/hooks"
:: RESTORATION ::
The restore method (AppUtils.restore_trac_subversion(restore_version)) also needs to be modified. (Line 57 ish)
change this:
AppUtils.restore_subversion("#{appdir}/svn/project", "#{dumpdir}/svndump")
AppUtils.restore_trac("#{appdir}/trac/project", "#{dumpdir}/tracdump")
to something like this:
AppUtils.restore_subversion("#{appdir}/svn/proj1", "#{dumpdir}/svn_proj1_dump")
AppUtils.restore_subversion("#{appdir}/svn/proj2", "#{dumpdir}/svn_proj2_dump")
AppUtils.restore_trac("#{appdir}/trac/proj1", "#{dumpdir}/trac_proj1_dump")
AppUtils.restore_trac("#{appdir}/trac/proj2", "#{dumpdir}/trac_proj2_dump")
I haven't tested a restore yet - will do that now.
RE: What about backups
I have tested a backup and restore using the trac JumpBox v1.0.2b (Both for the backup and the restore) and this works perfectly.
Just remember, you have to backup your modified /jumpbox/lib/apputils.rb independently and restore it to the new VM before attempting to run the restore.
Hope this helps others.
Rgds,
David
david@subdata.com
RE: What about backup
You should tell the readers at home what version of the Trac JumpBox you are working on just in case there are changes in the code you are modifying.
Austin
RE: What about backups
Thanks Austin,
For those playing the home game, I am running the trac-1.0.2b version JumpBox.
This JumpBox has svn v1.3.1 and trac v0.10.4
-David
create a new trac project
I've had great success doing this with these instructions. I also added the TracProjectMenu 1.0 plugin for a pretty smooth repo.
My only problem is that the User Accounts, while consistent between both contexts, lose their email address and name info in the additional contexts (trac instances)
Any idea how to remedy this?
create a new trac project
Sorry, that additional info is stored in that specific Trac instance, I haven't seen anything that would sync that type of information between instances. If you see anything to the contrary let me know. Also, thanks for pointing out the TracProjectMenu plugin. That looks useful, I will play with it when I get a chance.
Austin
create a new trac project
I know this is a Trac question and not a JumpBox question, but do you think it's safe to drop and re-add those users whose data is partially lost in the user admin for each Trac instance?
create a new trac project
Ok i solved the problem.
I have only one .htpasswd for the users so i thought every user who is TRAC_ADMIN in a project is admin for the other project too. I thought that permissions would be bequeath, but they dont.
So i tried to set the permission manual and now it works.
Sorry for my bad english ;-)
create a new trac project
Hi i created a new trac-project and it works and i have also the Login function. But in the new project the webadminplugin is missing.
I tried to install the webadminplugin in the /usr/share/trac/plugins folder but it dosen't work. The rights a already set to www-data and the plugin is enabled in the gloabel trac.ini --> /usr/share/trac/conf . How can i solve this problem?
create a new trac project
Note, the
sudo trac-adminline above should be continued on one line where it is indented or you can put backslashes at the end of the continued lines. The forum software wont let me post backslashes.Austin
create a new trac project
NOTICE - JumpBox does not support modifications made to the JumpBox on the command line. While, you are free to try this, proceed with caution because we won't be able to help in the event of trouble.
After you have registered if you want a new SVN and Trac project you can do the following as admin:
sudo svnadmin create --fs-type 'fsfs' /var/data/projects/svn/project2 sudo trac-admin /var/data/projects/trac/project2 initenv \ "My Second Project" sqlite:db/trac.db svn \ /var/data/projects/svn/project2 /usr/share/trac/templates sudo chown -R www-data:www-data /var/data/projects/svn/project2 sudo chown -R www-data:www-data /var/data/projects/trac/project2The Trac project should work but will be missing plugins and the JumpBox navbar if you access it via http://host/projects/project2/. To access your new SVN repository you will need to edit the dav_svn.conf file:
where you add access to the new repository:
Then restart apache
Perhaps we will automate this in the future.
Austin
Update - Check my later comment below for the exciting conclusion! Also, I have updated some of the formatting and removed some of the extraneous double quotes above.
A problem in setting up multiple projects
Be kind, I'm kind of new to this and am feeling my way along.
I've followed the instructions for setting up multiple projects, and am having one problem.
When I try to login to the new project I get an
Internal Error - Authentication information not available. Please refer to the installation documentation.
I've tried comparing contents of the two trac.ini files, etc. But I'm a bit confused here.
Any help would be appreciated.
Yeah, those instructions are
Yeah, those instructions are incomplete, the trac.ini for project2 needs to be updated. Its probably easiest to just copy the old one and update the name and repository_dir settings so they are correct.
The last thing you will need to do is grant the admin user TRAC_ADMIN permissions on the new trac project:
This should allow all of your other project users to log into this project and make the admin user an administrator in this project. This should cover most people's needs. All of this assumes you want the two Trac instances to be pretty much the same and share users, otherwise, mucking with the trac.ini is left as an exercise to the reader.
Austin
create a new trac project
The easiest way is to just run a separate Trac JumpBox for the new project. That's obviously fairly resource heavy but it's easy and it's really the way this JumpBox is intended to be used.
That said there's nothing that prevents you from registering the JumpBox, enabling shell access and then adding a new Trac project the way you would with any Trac installation.
Kimbro
create a new trac project
How do I create a new project in trac in this system?