Backup radio ubiquity via linux debian

Pertama itu ya pasti sedian linux base debian



Kedua app sshpass << install aja cara nya ada di google



Ketiga app scp << install aja cara nya ada di google



nah habis itu kita buat alias di /etc/hosts biar rapih nanti hasil backup nya 



  GNU nano 2.7.4                          File: /etc/hosts                           Modified



127.0.0.1       localhost

127.0.1.1       cisco

10.181.2.18     RADIO.001



# The following lines are desirable for IPv6 capable hosts

::1     localhost ip6-localhost ip6-loopback

ff02::1 ip6-allnodes



ff02::2 ip6-allrouters








habis itu di save ..





coba pancing ping ke RADIO.001






root@clonerxyz:~# ping RADIO.001 -c 3


PING RADIO.001 (10.181.2.18) 56(84) bytes of data.


64 bytes from RADIO.001 (10.181.2.18): icmp_seq=1 ttl=61 time=4.34 ms


64 bytes from RADIO.001 (10.181.2.18): icmp_seq=2 ttl=61 time=5.66 ms


64 bytes from RADIO.001 (10.181.2.18): icmp_seq=3 ttl=61 time=3.83 ms





--- RADIO.001 ping statistics ---


3 packets transmitted, 3 received, 0% packet loss, time 2004ms


rtt min/avg/max/mdev = 3.833/4.614/5.665/0.775 ms









nah jadi udah selaras kan ip sama alias nya 





sung kita sikat di shell nya 





tapi jangan buru-buru kita bikin pancingan buat ip list nya





ngasal aja isi nanti beberapa alias radio yang tadi di tambah di /etc/hosts






root@clonerxyz:~# echo RADIO.001 > ip.txt






nah habis itu kalau udah bikin ip list langsung kita bikin script shell nya






root@clonerxyz:~# cat backuprad.sh


#!/usr/bin/


for ip in `cat ip.txt`;do


sshpass -p foxampm scp -o StrictHostKeyChecking=no admin@$ip:/tmp/running.cfg /home/clo/radio-$ip.cfg



done











habis itu langsung kita run script nya












root@clonerxyz:~# sh backuprad.sh


Warning: Permanently added 'radio.001,10.181.2.18' (RSA) to the list of known hosts.









nah kalau udah langsung kita liat di folder nya , kalau menurut script tadi gue taruh di /home/clo






root@clonerxyz:~# cat /home/clo/radio-RADIO.001.cfg


aaa.1.radius.acct.1.status=disabled


aaa.1.radius.auth.1.status=disabled


aaa.1.radius.macacl.status=disabled


aaa.1.status=disabled


aaa.status=disabled


airview.tcp_port=18888


bridge.1.devname=br0


bridge.1.fd=1


bridge.1.port.1.devname=eth0


bridge.1.port.1.status=enabled


bridge.1.port.2.devname=ath0


bridge.1.port.2.status=enabled


bridge.1.status=enabled


bridge.1.stp.status=enabled


bridge.status=enabled


dhcp6c.status=disabled


dhcpc.1.devname=br0


dhcpc.1.status=disabled


dhcpc.status=disabled


dhcpd.status=disabled


discovery.cdp.status=enabled


discovery.status=enabled






nah nanti settingan yang ada di radio langsung ke import ke local linux kita





kalo mau expert tambahin cron mingguan atau bulanan 








Post a Comment

0 Comments

Ad Code