Back up CollabNet TeamForge data

Save a copy of your TeamForge site's data to a location from where you can quickly retrieve it to your TeamForge 17.1 site.

Important: The following instructions, though applicable in general to any PostgreSQL version, assume that you run a TeamForge version that runs on PostgreSQL 9.2, which you want to back up. Replace 9.2 with the PostgreSQL version you run, if required.
  1. Stop the TeamForge Application Server and the Apache Server.
    • /etc/init.d/httpd stop
    • /etc/init.d/collabnet stop
  2. Back up your site data.
    1. Make a dump file of your site database. (Do this on your database server in case you have your DB running on a separate server.)

      You have to do a PostgreSQL dump if you are upgrading the PostgreSQL application as part of your TeamForge upgrade.

      Note: These commands are for a PostgreSQL database, which is the default. If your site uses an Oracle database, follow the Oracle backup procedure instead.
      • su - postgres
      • /usr/bin/pg_dumpall > /var/lib/pgsql/9.2/backups/teamforge_data_backup.dmp
      • exit
      • mkdir /tmp/backup_dir
      • cp /var/lib/pgsql/9.2/backups/teamforge_data_backup.dmp /tmp/backup_dir/
      Note: If your reporting database is running on a separate port, back up your reporting database too:
      • /usr/bin/pg_dumpall -p <reports_database_port> > /var/lib/pgsql/9.2/backups/teamforge_reporting_data_backup.dmp
    2. Make an archive file with the following data directories:
      Directory Contents
      /opt/collabnet/teamforge/var User-created data, such as artifact attachments
      /opt/collabnet/reviewboard Review Board data
      /opt/collabnet/codesearch Black Duck Code Sight (BDCS) data, in case you have BDCS installed
      /svnroot Subversion source code repositories
      /sf-svnroot Subversion repository for branding data
      /cvsroot CVS source code repositories (not present on all sites)
      • cp -Rpf /svnroot /sf-svnroot /cvsroot /gitroot /opt/collabnet/teamforge/var /opt/collabnet/reviewboard /opt/collabnet/codesearch /tmp/backup_dir
      • cd /tmp
      • tar czvf backup.tgz backup_dir
      If GIT integration is enabled, do the following:
      • cp -Rpfv /gitroot /tmp/backup_dir
      • cp -Rpfv /opt/collabnet/gerrit/ /tmp/backup_dir/gerrit
      Compress your backup data.
      • cd /tmp
      • tar czvf backup.tgz backup_dir
    3. Back up your SSH keys, if any.
    4. Back up your SSL certificates and keys, if any.