Perform local backup on target Nodegrid with Ansible

Perform local backup on target Nodegrid with Ansible

Ansible can be used to save current configuration of Nodegrid device and saved as a backup file.

In local backup, the saved configuration will be saved locally in the Nodegrid.

This is the template file one needs for this task: localbackup.j2
Here template file is in templates folder. So, the path is /etc/ansible/templates/localbackup.j2

  1. cd /system/toolkit
  2. save_settings
  3. set destination=local_system
  4. set filename={{ ng_backup }}
  5. save
  6. finish
  7. commit

Next task is to create a playbook to run this task: localbackup.yml
This yml file is at /etc/ansible/localbackup.yml 

  1. ---
  2.  - name: Take a backup of remote nodegrid
  3.    hosts: Nodegrid
  4.    become: true
  5.    gather_facts: yes
  6.    vars:
  7.      ng_backup: newbackup
  8.    tasks:
  9.    - name: Copy template to remote nodegrid
  10.      template:
  11.        src: templates/localbackup.j2
  12.        dest: /tmp/localbackup.cli

  13.    - name: Apply the backup
  14.      command: cli -f /tmp/localbackup.cli

  15.    - name: ACK
  16.      debug:
  17.        msg: " Backup is created "
Now, run the playbook with command: ansible-playbook localbackup.yml

One will see that backup will be saved in /backup folder with filename given in the playbook.
    • Related Articles

    • Improved Nodegrid UI for backup

      New for Nodegrid 6.0, the user interface for Nodegrid Save Settings (backup) is improved. Previously, the backup option from System::Toolkit::Save_Settings would save backups to the main disk to the root location /backup when you select "Local ...
    • How to: Backup a Nodegrid device using ZPE Cloud

      ZPE cloud enables managing on-demand and scheduled backups of your Nodegrid devices. Login to ZPE Cloud Go to Devices :: Enrolled Select the devices you want to backup and then click Backup. You can backup multiples devices at once. Select the File ...
    • How To: Live Backup VM and Restore VM on Nodegrid

      There are several ways to backup virtual machines and as Nodegrid becomes a popular choice for hosting virtual machines in the data center or at the edge running on our Nodegrid Service Routers, administrators need a way to backup and restore the VM. ...
    • Backing up the Nodegrid Appliance

      Nodegrid backup is complete backup of all configuration. Follow these steps to take backup through WebUI, 1. Login as admin and navigate to System::Toolkit 2. Select Save Settings  3. One has to select the destination to store the backup     Local ...
    • Restoring backups to a Nodegrid Appliance

      Nodegrid restore is an easy way to restore backups from stored configuration backups  Follow these steps to restore backup to the Nodegrid 1. Login as admin and navigate to System::Toolkit 2. Select Apply Settings 3. Now one has to choose where to ...