Hopefully fetch works well for you. For some reason I find Mikrotik scripts/schedules to be very unreliable, certainly through versions. It seems every few months I need a new Mikrotik backup email script...
Syntax looks great, hopefully it's simple enough that it stays working. Josh Luthman Office: 937-552-2340 Direct: 937-552-2343 1100 Wayne St Suite 1337 Troy, OH 45373 On Wed, Nov 16, 2016 at 1:23 PM, Scott J. Hammersley < [email protected]> wrote: > This is a dumbed down portion of a script a wrote to sync VRRP members. > Change the necessary values to sort, set a schedule (possibly 24hrs etc) > for the operations and off you go. > > > > On Primary DHCP Server: > > > > /ip dhcp-server leases export file=dhcp_leases.rsc > > :log warning "DHCP Leases Exported" > > > > On Backup DHCP Server: > > > > /tool fetch address=PRIMARY_IP_ADDRESS src-path=dhcp_leases.rsc > dst-path=dhcp_leases.rsc user=USERNAME mode=ftp password=PASSWORD; > > /ip dhcp-server leases remove [find] > > /import dhcp_leases.rsc > > :log warning "DHCP leases Imported" > > > > > > Thanks, > > > > *Scott Hammersley* > > > *MTCINE # 1504 / MikroTik Certified Trainer MTCRE, MTCTCE, MTCWE, MTCNA, > MTCUME, ATSA * > *Network Architect / Managing Partner* > (601) 291-8199 - Mobile > (303) 590-9945 – Office > scott_hammersley – Skype > [image: iparchitechs_ms_logo_msp-header-166x46] > > *#1 Ranked MikroTik consulting firm in North America* > > *Expert consulting in | BGP | MPLS | OSPF | ISP | Data Center* > > > > *IPA 2016 Conference Schedule – Come meet up with us !!* > > > > 2016 FTTH Connect – Nashville, TN – June 13 - 15 > > WISPAPALOOZA (WISPA) USA – Las Vegas, Nevada – TBA - Fall 2016 > > MikroTik User Meeting (MUM) CANADA – TBA – Fall 2016 > > > > > > *From:* [email protected] [mailto:mikrotik-users- > [email protected]] *On Behalf Of *Josh Luthman via Mikrotik-users > *Sent:* Wednesday, November 16, 2016 11:41 AM > *To:* Roy <[email protected]> > *Cc:* Mikrotik Users <[email protected]> > *Subject:* Re: [Mikrotik Users] Synchronize DHCP server static assignments > > > > Ip DHCP server lease remove [find] > > Josh Luthman > Office: 937-552-2340 > Direct: 937-552-2343 > 1100 Wayne St > Suite 1337 > Troy, OH 45373 > > > > On Nov 16, 2016 12:34 PM, "Roy" <[email protected]> wrote: > > > > "clear them in the backup" doesn't seem to be a trivial task > > On 11/16/2016 7:07 AM, Josh Luthman wrote: > > Clear them in the backup and copy them all over with SSH? > > Josh Luthman > Office: 937-552-2340 > Direct: 937-552-2343 > 1100 Wayne St > Suite 1337 > Troy, OH 45373 > > > > On Nov 16, 2016 9:05 AM, "Roy via Mikrotik-users" < > [email protected]> wrote: > > We have a Mikrotik DHCP server where there are a lot of "static" > assignments of IP specific addresses to MAC addresses. > > I would like to have an automatic mechanism to copy them to the "backup" > DHCP server. Does anyone have a technique for doing this? > > > > > _______________________________________________ > Mikrotik-users mailing list > [email protected] > http://lists.wispa.org/mailman/listinfo/mikrotik-users > > > >
_______________________________________________ Mikrotik-users mailing list [email protected] http://lists.wispa.org/mailman/listinfo/mikrotik-users
