Creating a Backup File for a NI Linux Real-Time System

Updated Nov 18, 2022

Environment

Operating System

  • LabVIEW Real-Time (NI Linux Real-Time)

This article explains how to create a backup file of a NI Linux Real-Time system.
A backup file can be helpful in a number of situations as restoring the original system after a data loss event.

In order to create the backup file please complete the following steps.

1. Insert a USB storage device into the system
2. Open the terminal
3. Enter the following commands in the terminal
 
su admin
mkdir ~/usbdrive
fdisk -l


4. Look for the flash drive path, most probably it will be /dev/sdb1 or /dev/sdc1, in order to confirm, run fdisk -l once again without attaching the USB storage device
 
mount /dev/sdb1 ~/usbdrive
dd if=/dev/sda | gzip > ~/usbdrive/sda.backup

NOTE:  The last line will execute for ~5-20 minutes.

You have successfully created a backup file for your NI Linux Real-Time system. 
If you have created a backup file and now want to restore to it please follow the steps described in the Next Steps section.

Next Steps

In order to restore the backup please complete the following steps.

1. Copy the backup file to a USB storage device

2. Insert the storage device into your system

3. Perform the following steps in the terminal
 
su admin
mkdir ~/usbdrive
fdisk -l

4. Look for the flash drive path, it should be /dev/sdb1 or /dev/sdc1, and perform these steps in the terminal
 
mount /dev/sdb1 ~/usbdrive
dd if=~/usbdrive/sda.backup | gunzip > /dev/sda

 
NOTE:  This may take a while, simply wait till it finishes.