Published Oct 30, 2023 by Muhamad Rafli Maulana Rizki
Konfigrasi Backup Otomatis dan Manual menggunakan FTP server,
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*
#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/
Create Scheduler (Action), Action (Policy) and Destination.
user@host# set event-options generate-event Backup-Daily_event time-of-day "00:00:05 +0700"
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
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
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