Community discussions

 
arxont
just joined
Topic Author
Posts: 9
Joined: Fri Nov 02, 2012 11:45 am

Mikrotik SSH Backup - my solution

Wed Oct 09, 2013 4:42 pm

Hello All! I am created mini-tools for Mikrotik configuration backup over SSH.

One function - Backup and sending e-mail on failure. The program is written. NET.

Can run with a key "Backup" (command line, sample "MikrotikSSHBackup.exe Backup") for background backup.
mikrotik SSH Backup.png
Download - https://dl.dropboxusercontent.com/u/101 ... Backup.zip
GitHub - https://github.com/psionika/MikrotikSSHBackup

It will be good if somebody come in handy :)
You do not have the required permissions to view the files attached to this post.
 
User avatar
rickfrey
Trainer
Trainer
Posts: 610
Joined: Sun Feb 14, 2010 11:41 pm
Location: Van, Texas
Contact:

Re: Mikrotik SSH Backup - my solution

Mon Feb 17, 2014 8:09 am

Very nice! Thank you!
Launch your company forward with professional training!
http://rickfreyconsulting.com/product-c ... raining-2/
 
User avatar
docmarius
Forum Guru
Forum Guru
Posts: 1188
Joined: Sat Nov 06, 2010 12:04 pm
Location: Timisoara, Romania
Contact:

Re: Mikrotik SSH Backup - my solution

Wed Feb 19, 2014 9:21 am

Nice tool, thank you.

Just a small bug: If regional settings on the host computer include forward slash, the path of the backup file can not be created, since Windows doesn't allow slash in file names.

e.g. Date setting MM/dd/yyy will try to create invalid file name "rb450, IP 192.168.1.1 02/19/2014 09-15-09.txt" and give an error message.
while yyy-MM-dd will create "rb450, IP 192.168.1.1 2014-02-19 09-15-09.txt" which is OK.
Creating/parsing your own date string is needed for portability.
Torturing CCR1009-7G-1C-1S+, RB450G, RB750GL, RB951G-2HnD, RB960PGS, RB260GSP, OmniTIK 5HnD and NetMetal 922UAGS-5HPacD + R11e-5HnD in my home network.
 
arxont
just joined
Topic Author
Posts: 9
Joined: Fri Nov 02, 2012 11:45 am

Re: Mikrotik SSH Backup - my solution

Wed Feb 19, 2014 3:34 pm

FIXED: Changed in the file creation date to the substitution
DateTime.Now.ToString(CultureInfo.InvariantCulture)
                             .Replace(@"/", "-")
                             .Replace(":", "-")+".txt"
That cleared up the problem with the creation of files with different regional settings.

ADD: Editing by double-clicking on the row

ADD:
Close settings and add/edit forms after press ESC

ADD:
Added progressbar when working backup through the form

Download: https://dl.dropboxusercontent.com/u/101 ... Backup.zip
GitHub - https://github.com/psionika/MikrotikSSHBackup
 
User avatar
rickfrey
Trainer
Trainer
Posts: 610
Joined: Sun Feb 14, 2010 11:41 pm
Location: Van, Texas
Contact:

Re: Mikrotik SSH Backup - my solution

Wed Feb 19, 2014 5:41 pm

I've only been able to play with this a little, but so I love it. Thank you for putting this together! :D
Launch your company forward with professional training!
http://rickfreyconsulting.com/product-c ... raining-2/
 
User avatar
docmarius
Forum Guru
Forum Guru
Posts: 1188
Joined: Sat Nov 06, 2010 12:04 pm
Location: Timisoara, Romania
Contact:

Re: Mikrotik SSH Backup - my solution

Wed Feb 19, 2014 6:39 pm

Thank you for the fix. This is a really nice tool.
The only thing it is missing is a restore button :lol:
Torturing CCR1009-7G-1C-1S+, RB450G, RB750GL, RB951G-2HnD, RB960PGS, RB260GSP, OmniTIK 5HnD and NetMetal 922UAGS-5HPacD + R11e-5HnD in my home network.
 
ditonet
Forum Veteran
Forum Veteran
Posts: 829
Joined: Mon Oct 19, 2009 12:52 am
Location: Europe/Poland/Konstancin-Jeziorna
Contact:

Re: Mikrotik SSH Backup - my solution

Thu Feb 20, 2014 12:17 am

Nice tool, thanks.
I have a feature request:
1. add ability to define port used by SSH service, currently is fixed to 22. I always use non-standard port for SSH to prevent automated port scanning.
2. some kind of credentials encryption in 'data.xml' and 'settings.xml' files. Maybe I'm slightly paranoic :)

Best regards,
Grzegorz | MTCNA, MTCRE | konsultacje MikroTik Warszawa
It is a book about a Spanish guy called Manual. You should read it. - Dilbert
 
User avatar
rickfrey
Trainer
Trainer
Posts: 610
Joined: Sun Feb 14, 2010 11:41 pm
Location: Van, Texas
Contact:

Re: Mikrotik SSH Backup - my solution

Thu Feb 20, 2014 5:07 am

Maybe I'm slightly paranoic :)
Once you enter the world of routing & switching, you can't help but become paranoid :shock: :D
Launch your company forward with professional training!
http://rickfreyconsulting.com/product-c ... raining-2/
 
arxont
just joined
Topic Author
Posts: 9
Joined: Fri Nov 02, 2012 11:45 am

Re: Mikrotik SSH Backup - my solution

Thu Feb 20, 2014 3:15 pm

  • ADD: SSH port parameter
  • ADD: Create context menu (add, copy, edit, delete)
  • ADD: Add to context menu - "Connect over winbox" (connect if the ssh user has rights to connect and winbox.exe located in the same folder as the program)
  • ADD: remove color and stateBackup after press :"Start Button".
  • ADD: Encrypt data.xml (for command run "MikrotikSSHBackup.exe Backup YourPassword")
  • CHANGE: Move email settings to data.xml (for Encrypt)
  • CHANGE: Remove ProgressBarForm and add progressbar in statusstrip
  • FIXED: Tab key order in AddEdit Forms
Download: https://dl.dropboxusercontent.com/u/101 ... Backup.zip
GitHub - https://github.com/psionika/MikrotikSSHBackup
 
User avatar
rickfrey
Trainer
Trainer
Posts: 610
Joined: Sun Feb 14, 2010 11:41 pm
Location: Van, Texas
Contact:

Re: Mikrotik SSH Backup - my solution

Thu Feb 20, 2014 5:01 pm

arxont, I am really very impressed with this program and with you improvements you have made with it. Thank you! Can you explain how do this:
ADD: Add to context menu - "Connect over winbox" (connect if the ssh user has rights to connect and winbox.exe located in the same folder as the program)
Launch your company forward with professional training!
http://rickfreyconsulting.com/product-c ... raining-2/
 
User avatar
boen_robot
Forum Guru
Forum Guru
Posts: 2379
Joined: Thu Aug 31, 2006 4:43 pm
Location: europe://Bulgaria/Plovdiv

Re: Mikrotik SSH Backup - my solution

Thu Feb 20, 2014 6:28 pm

Nice.

@arxont
GitHub have this thing known as releases. Consider putting the binaries there... and maybe tag some versions?
PEAR2_Net_RouterOS(1.0.0b6) - My API client in PHP
(Rate my posts? If you want... no pressure...)
 
nbctcp
just joined
Posts: 22
Joined: Tue Sep 16, 2014 7:32 pm

Re: Mikrotik SSH Backup - my solution

Wed Sep 24, 2014 4:10 am

Thank you for your nice tool.
If possible could you please add box to set time to launch backup
 
nbctcp
just joined
Posts: 22
Joined: Tue Sep 16, 2014 7:32 pm

Re: Mikrotik SSH Backup - my solution

Wed Sep 24, 2014 4:12 am

Nice tool
I have request if possible to put time box, so that I can set the time when a backup script would run

tq
 
arxont
just joined
Topic Author
Posts: 9
Joined: Fri Nov 02, 2012 11:45 am

Re: Mikrotik SSH Backup - my solution

Sun Oct 26, 2014 5:13 am

Nice tool
I have request if possible to put time box, so that I can set the time when a backup script would run

tq
Hello. No this functional.
Use standart windows Task Scheduler (or other realizations - xStarter, nnCron)

Who is online

Users browsing this forum: No registered users and 4 guests