Candela Technologies Logo
Network Testing and Emulation Solutions

Backing Up and Migrating LANforge Data

Goal: Learn what directories under /home/lanforge are important to backup and transfer to a new LANforge.

Most of the data that LANforge produces lives in the directory /home/lanforge. Not all the files and directories under there are useful to backup or migrate to a new LANforge machine. This guide relates to Linux based LANforge machines.
We will assume for this cookbook during a restore situation you have the two LANforge systems connected on the same management network.
 
  1. LANforge data lives in various directories under /home/lanforge, and this is a brief explanation of the directories you will want to transfer.
    LANforge scenario data for a realm is saved on the manager (typically resource 1).
    The LANforge client (GUI) can save reports on various machines where it is running. It does not save scenario data.
  2. Below are listed the important sub-directories from /home/lanforge,. Each has a note about how important it is to back up. Directories not listed are unlikely to contain LANforge related data.
    When in doubt backing up the entire /home/lanforge directory is OK
    1. DB/
      YES this is were all your scenarios are saved
    2. Desktop/
      only if you save things here
    3. Documents/
      only if you save things here
    4. Downloads/
      only if you save things here
    5. html-reports/
      yes if you want the reports
    6. lf_reports/
      yes if you want the data
    7. local/
      unlikely unless you customize strongswan
    8. report-data/
      yes if you want the data
    9. scripts/
      only if you have modified or custom scripts in here
    10. trb_entities/
      trb_profiles/
      Table Report Builder saved settings only necessary if you use TRB frequently
    11. vr_conf/
      only if you save virtual router settings, nginx configs or want to save dhcp lease files
    12. wifi/
      only if you have customized wpa_supplicant.conf or hostapd.conf files
  3. Archiving Data

    Starting on your old LANforge machine, use the tar command to archive data. Add directories you want to archive to the end of the command.
    cd /home/lanforge
    tar cjf /home/lanforge-bu.tar.bz2 DB html-reports lf_reports report-data
    If you run out of space, try using /home/lanforge/check_large_files.bash to help clear room.
  4. Copy the Archive

    Copy the archive to the new LANforge:
    scp /home/lanforge-bu.tar.bz2 lanforge@your-new-machine-ip:/var/tmp
  5. Restore the Data

    On the new machine:
    cd /home/lanforge
    tar xvf /var/tmp/lanforge-bu.tar.bz2
    sudo service lanforge restart

Candela  Technologies, 2417 Main Street, Suite 201, Ferndale, WA 98248, USA
www.candelatech.com | sales@candelatech.com | +1.360.380.1618
Facebook | LinkedIn | Blog