User Tools

Site Tools


NEMS Linux Command: nems-restore

The NEMS Migrator tool allows you to export/backup your NEMS configuration (backup.nems) as well as import a previous backup (through the Restore option).

The NEMS Migrator backup and restore options are great for keeping a safe backup without having to shutdown your NEMS server. Just download the file once in a while, or back it up automatically with your daily backup script.

NEMS Migrator is also helpful when upgrading from previous versions of NEMS, or when moving from one platform to another, saving you having to reconfigure your NEMS deployment just to get the latest features or upgraded hardware.

Important Note

I am a firm believer in redundancy, and protecting your data. What I'd like you to do is, export your migration file, then install NEMS on a new MicroSD card. Then boot from that and restore your NEMS Migrator backup. Once you've confirmed everything worked well, you can deprecate the old one safely. However, if something went wrong, you can contact me to fix it for you, and continue running from the old SD card in the interim.

How to Restore a NEMS Migrator Backup

While you can use NEMS Migrator to backup any version of NEMS (and even NagiosPi) the restore feature requires NEMS 1.2+

First Step

  1. Deploy the version of NEMS you wish to restore the backup to. Please heed my Important Note above.
  2. Boot the new NEMS Linux deployment and mount the USB flash drive.

Restore a Local Backup

  1. Place your backup.nems file on a USB flash drive. To obtain this from a running NEMS server, you can download it directly in your web browser at https://nems.local/backup/
  2. Determine the location of backup.nems in relationship to your mountpoint. For example, if you mounted the USB flash drive on /mnt/flash you may determine the location to be /mnt/flash/backup.nems
  3. Armed with that information, run the following command (use the full path to your backup.nems file):
    sudo nems-restore /mnt/flash/backup.nems

Restore an Off-Site Backup

This requires an active NEMS Migrator Off-Site Backup account.

  1. Run the command and choose the date you'd like to restore to:
    sudo nems-restore osb

Your OSB account is tied directly to your NEMS server hardware. Therefore, if you change your hardware, a direct restore will not be possible. In that case, you must contact me directly for assistance.

Final Step

  1. Follow the prompts on screen to restore your configuration to the new NEMS Linux deployment. If it fails for any reason, you can safely shut down and replace the SD card with your original deployment.

If you have any problems (or praise) please post in the NEMS Linux community forum.

commands/nems-restore.txt · Last modified: 2018/05/19 11:20 by Robbie Ferguson