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.4 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.3, which you want to back up. Replace 9.3 with the PostgreSQL version you run, if required.
  1. Stop TeamForge.
    If you are upgrading from TeamForge 16.7 or earlier releases:
    • /etc/init.d/collabnet stop all
    If you are upgrading from TeamForge 16.10 or later releases:
    • /opt/collabnet/teamforge/bin/teamforge 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 > /opt/collabnet/teamforge/var/pgsql/9.3/backups/teamforge_data_backup.dmp
      • exit
      • mkdir /tmp/backup_dir
      • cp /opt/collabnet/teamforge/var/pgsql/9.3/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.3/backups/teamforge_reporting_data_backup.dmp
      • cp /opt/collabnet/teamforge/var/pgsql/9.3/backups/teamforge_reporting_data_backup.dmp /tmp/backup_dir/
    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
      /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/teamforge/var/reviewboard/data /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.