Support Center

How to Backup and Restore a Sensor

Last Updated: Jul 19, 2018 10:52AM EDT
To backup the configuration of a sensor registered to Pulse, perform the following steps:
  1. Use SSH and login to the sensor with the pwnie user account.
  2. Type sudo su and press Enter, then re-type the password to become superuser.
  3. Next, type ./opt/pwnix/pwnix-scripts/backup.sh and press Enter to backup the sensor's configuration.
  4. Lastly, copy the tar.xz file found in the /opt/pwnix/pwnix-scripts directory from the sensor to a safe location (not on the sensor).

    For reference the backup file name will reflect "pwnix" followed with the MAC address of the sensor's eth0 Interface and the date/time stamp when the script was run, i.e. "pwnix-000c292a9942-20180427.tar.xz"
 
To restore the sensor:
  1. Use SSH and login to the sensor with the pwnie user account.
  2. Type sudo su and press Enter, then re-type the password to become superuser.
  3. Next, using WinSCP, SSH or some other means, copy the backup file created to the /tmp directory on the sensor.
  4. Next, type ./opt/pwnix/pwnix-scripts/restore.sh /tmp/pwnix-000c292a9942-20180427.tar.xz and press Enter.

    Note the backup file name reflected above is provided as an example.
     
  5. Afterward, reboot the sensor
At this time, the configuration of the sensor has been fully restored.

OPTIONAL: If desired to create a backup file across multiple sensors and copy the resultant backup file to an FTP server, the following script may be created within Pulse and run as a task to accomplish this goal. Of course the success of copying the backup file to the FTP server is entirely dependent on the sensor(s) involved having connectivity to the FTP server specified. If the sensor does not have connectivity or if connectivity to the FTP server should fail, then the backup file remains on the sensor itself and is not copied to the FTP server.
 
#!/bin/bash
# run backup.sh script
cd /opt/pwnix/pwnix-scripts/
rm pwnix-*.tar.xz
./backup.sh
sleep 3
# copying backup file using FTP
HOST='{{host}}'
USER='{{user}}'
PASSWD='{{password}}'

ftp -n $HOST <<END_SCRIPT
quote USER $USER
quote PASS $PASSWD
passive
binary
put pwnix*.tar.xz
quit
END_SCRIPT
exit 0

Contact Us

  • Email Us
  • Phone: 1-855-793-1337 x3 9am-5pm EST, Monday through Friday
support@pwnieexpress.com
http://assets3.desk.com/
false
desk
Loading
seconds ago
a minute ago
minutes ago
an hour ago
hours ago
a day ago
days ago
about
false
Invalid characters found
/customer/en/portal/articles/autocomplete