Kemp Support, how can we help?

The latest application delivery knowledge and expertise at your fingertips.

Automating configuration backups

 

Information

 

Summary:

Description of possible ways to automate backups of Flowmon OS configuration in the form of an XML file.

Environment:

Product: Flowmon OS

Version: Any

Platform: Any

Question/Problem Description:

How can I automate XML backups?

Steps to Reproduce:  
Error Message:  
Defect Number:  
Enhancement Number: NPMD-I-184
Cause:  
Resolution:

Configuration files are periodically generated every midnight to the /etc/flowmon/config-backup/ folder. The file name is 

config-backup-YYYY-MM-DD.xml

The latest ten files are kept in the folder. Older backups are stored in /etc/flowmon/daily-backup/ folder.

There are different ways to automate XML backup:

  1. (Recommended) Use a remote backup server to run SCP and download the XML file from Flowmon OS.
    a) Configure SSH key-based authentication
    b) Periodically run SCP on the backup server to obtain an XML file:
    scp flowmon@<Flowmon_OS_IP>:/etc/flowmon/config-backup/config-backup-YYYY-MM-DD.xml /local/directory/
  2. Copy XML files periodically to Samba storage.
    a) Configure storage in Configuration Center - System - System settings - External Data Storage. The storage is automatically mounted to the /mnt/external/ folder.
    b) Use a cron entry to copy XML to Samba storage daily. Run via SSH:
    crontab -l > /home/flowmon/crontab.txt
    c) Add the following line to the crontab.txt file:
    @daily /usr/bin/cp -n /etc/flowmon/config-backup/* /mnt/external/
    d) Save the cron entry:
    crontab /home/flowmon/crontab.txt
  3. Send XML files periodically to e-mail.
    a) Configure e-mail in Configuration Center - System - System settings - Email.
    b) Use a cron entry to send the XML file via e-mail. Run via SSH:
    crontab -l > /home/flowmon/crontab.txt
    c) Add the following line to the crontab.txt file (change the mail address):
    @daily /usr/bin/php /var/www/shtml/index.php Cli:SendEmail -body="XML backup" -to="mail@example.com" -attachments="`ls -dtr1 "/etc/flowmon/config-backup"/* | tail -1`" -subject="FOS backup `date`"
    d) Save the cron entry:
    crontab /home/flowmon/crontab.txt

Custom cron modifications are not covered by Flowmon support! It is always recommended to backup the crontab.txt file before doing any modification. A custom cron entry might be removed during future upgrades, so it is recommended to verify the entry after every upgrade of Flowmon OS.

Workaround:  
Notes:  

Was this article helpful?
0 out of 0 found this helpful

Comments