#juniper #network

Manually and Automatically Backup - Juniper

Published Oct 30, 2023 by Muhamad Rafli Maulana Rizki


Konfigrasi Backup Otomatis dan Manual menggunakan FTP server,

Set Clock

Pastikan Waktu sudah sesuai, karena format file menggunakan Tanggal dan waktu.

#show time 
user@host> show system uptime 
user@host# set system time-zone Asia/Jakarta #Set Timezone*

#jika belum sesuai, bisa di set manual.
user@host> set date 202310131309* 

1. Manual Backup

#Backup Configuration Juniper
user@host# save SW.HOME_13Okt23
user@host# commit

#Cek File
user@host> file list

#Upload File to FTP Server
user@host> file copy SW.JUNOS.13okt ftp://admin@172.16.10.10/switch/

2. Automatic Backup

Event-Options

Create Scheduler (Action), Action (Policy) and Destination.

user@host# set event-options generate-event Backup-Daily_event time-of-day "00:00:05 +0700"
Policy

Action yang akan dilakukan jika event sudah sesuai dengan yang di jadwalkan

user@host# set event-options policy Backup-Daily_police events Backup-Daily_event
#Upload/backup config juniper to destination
user@host# set event-options policy Backup-Daily_police then upload filename /config/juniper.conf.gz destination ftp_server
Destination

Note : Harus sudah memiliki FTP Server, untuk user, ip dan path nya bisa di sesuaikan

user@host# set event-options destinations ftp_server archive-sites ftp://admin@172.16.10.10/switch/ password test112233
#or
user@host# set event-options destinations ftp_server archive-sites ftp://admin:test112233@172.16.10.10/switch/

Note: Commit Configuration

Configuration Results

event-options {
    generate-event {
        Backup-Daily_event time-of-day "00:00:10 +0700";
    }
    policy Backup-Daily_police {
        events Backup-Daily_event;
        then {
            upload filename /config/juniper.conf.gz destination ftp_server;
        }
    }
    destinations {
        ftp_server {
            archive-sites {
                "ftp://admin@172.16.10.10/switch/" password "$9$SDFASDdfsdfsdfSDsfsdFSDd"; ## SECRET-DATA
            }
        }
    }
}

Reference




*****

© 2023, Rafli Maulana Rizki | GitHub Linkedin Instagram • theme for Jekyll.