Community discussions

MikroTik App
 
rnbguy
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 55
Joined: Fri Sep 12, 2008 8:55 am

backup the dude using command line????

Tue Nov 04, 2008 2:22 pm

hi guys how can i make the dude run a backup using command line (to automate this)
 
User avatar
sergejs
MikroTik Support
MikroTik Support
Posts: 6695
Joined: Thu Mar 31, 2005 3:33 pm
Location: Riga, Latvia
Contact:

Re: backup the dude using command line????

Tue Nov 04, 2008 3:09 pm

There is almost no any available settings for Dude server from RouterOS console.
When Dude running on the Windows PC, backup is available only from GUI.
 
rnbguy
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 55
Joined: Fri Sep 12, 2008 8:55 am

Re: backup the dude using command line????

Tue Nov 04, 2008 3:47 pm

bummmmmerrrr i wish i couldve automated backups
 
lebowski
Forum Guru
Forum Guru
Posts: 1619
Joined: Wed Aug 27, 2008 5:17 pm

Re: backup the dude using command line????

Mon Nov 10, 2008 6:21 pm

In windows... The folder Dude\data contains your data create a scheduled task that makes a copy of this folder somewhere else through a batch job. Maybe just copy the whole Dude folder somewhere else just to be safe? I have not tried this so YMMV...

HTH!
 
rnbguy
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 55
Joined: Fri Sep 12, 2008 8:55 am

Re: backup the dude using command line????

Mon Nov 10, 2008 11:51 pm

wow nice reply.
 
lebowski
Forum Guru
Forum Guru
Posts: 1619
Joined: Wed Aug 27, 2008 5:17 pm

Re: backup the dude using command line????

Mon Nov 10, 2008 11:59 pm

I am going to try this my self, let you know how it goes...
 
lebowski
Forum Guru
Forum Guru
Posts: 1619
Joined: Wed Aug 27, 2008 5:17 pm

Re: backup the dude using command line????

Tue Nov 11, 2008 12:10 am

yeah it works... I would only run this style backup once a week instead of daily since if you run it daily and you break something bad you might not know until it is too late and the corruption is saved in your backup. The whole Dude directory is like 100M so you could easily script it to do multiple different directories or a batch job for each day of the week so you can recover from any point in time ... like 1 week 1 month, you know real backups :)

c:
cd "\Program Files"
xcopy /Y /S dude dudebackup
 
rnbguy
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 55
Joined: Fri Sep 12, 2008 8:55 am

Re: backup the dude using command line????

Tue Nov 11, 2008 12:15 am

excellent and doing a restore from this backup worked out good for you?
 
lebowski
Forum Guru
Forum Guru
Posts: 1619
Joined: Wed Aug 27, 2008 5:17 pm

Re: backup the dude using command line????

Tue Nov 11, 2008 12:18 am

Heck no I am not testing that :) hehe Unless I break something. I suppose I could run it on another computer... Just copy the directory but alas I have no interest in that either.

I have a fairly complicated setup all built by hand.. no auto discovery and do not want to play with the working system unless I am forced to.

Keep in mind if your going to try to copy back you need to stop the service and make sure the exe is not running on the server also.
 
rnbguy
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 55
Joined: Fri Sep 12, 2008 8:55 am

Re: backup the dude using command line????

Tue Nov 11, 2008 12:34 am

tested and works perfectly.
 
User avatar
znet
Member Candidate
Member Candidate
Posts: 131
Joined: Mon Jul 24, 2006 8:07 pm
Location: Houston, Texas

Re: backup the dude using command line????

Tue Nov 11, 2008 7:36 am

Funny I just ran into this thread. rc3 just committed unrecoverable error. Unable to restart instance. MMC 'Stop' service produced a script error in IE! Unable to stop instance...Restart? What do you think?...

BTW, the event viewer suddenly has started reporting ~680 occurrances of a dude restart.
Reporting this error repeatedly, yes over and over again...WHAT! TF....

So, as some were asking, running dude.exe from a copy of the subdirectory of a former instance will certainly work, as has occurred at times to serve as production. Just be careful you remember who is accessing it, and what data they are viewing. It and they could easily get confused, maybe start re-starting itself incessantly....I digress. Also make sure you deactivate 'run as service' for the original instance through the server settings at login. If you dont, I cannot predict if you will be able to unscramble your data, so be careful. Yes, running it on a remote machine, maybe even not networked would be pretty bulletproof for non-corruption of production data. And, just make sure there are no dude.exe procs running. If so, they are up to no good. End them...

What gives Normis? I very rarely lose data, but this was fatal
 
User avatar
normis
MikroTik Support
MikroTik Support
Posts: 26385
Joined: Fri May 28, 2004 11:04 am
Location: Riga, Latvia

Re: backup the dude using command line????

Tue Nov 11, 2008 3:46 pm

No idea. Did you send those crashes to support? We will at least have something to start on
 
User avatar
znet
Member Candidate
Member Candidate
Posts: 131
Joined: Mon Jul 24, 2006 8:07 pm
Location: Houston, Texas

Re: backup the dude using command line????

Tue Nov 11, 2008 7:39 pm

The only crash report available is the event viewer message. It seems to be happening on a regular basis, about every 10-11min. It must be one object that is corrupt, even though I have rolled back to previous backup before it was experiencing trouble.

Event Viewer log entry:
The The Dude Server service terminated unexpectedly. It has done this 81 time(s). The following corrective action will be taken in 60000 milliseconds: Restart the service.

This message varies, but always with 'It has done this 'too many times' ' !!!

Will send a message to support, but this is killing me, and corrupting my bandwidth history again...
 
lebowski
Forum Guru
Forum Guru
Posts: 1619
Joined: Wed Aug 27, 2008 5:17 pm

Re: backup the dude using command line????

Wed Nov 12, 2008 7:41 pm

Hey Znet, Damn that sounds bad...

I thought of the trouble from running Dude from the backup/non-default directory while having the other directory still in tact and being the install directory could cause serious badness, is this what happened with yours?

I think people should never run Dude from their backup directory. Just copy files around while the dude is shut down if trying to do a restore from a backup.

Anyhow I hope I didn't contribute to your trouble and that you find a quick solution.

SD
 
User avatar
znet
Member Candidate
Member Candidate
Posts: 131
Joined: Mon Jul 24, 2006 8:07 pm
Location: Houston, Texas

Re: backup the dude using command line????

Thu Nov 13, 2008 7:13 am

No, I have not lost data by running from the backup subdirectory. However, depending on how your setup is configured, if you accidently boot the machine and forget that the auto-start instance of the Dude hasnt been disabled, you could run into problems starting the backup instance.

I stripped all duplicate objects (on different maps), and pared it down to minimum, checking every credential possible, and it still is misbehaving. Will try it on a totally remote and clean server and see if it chokes. I also will have to try Dude on RouterOS. I have it on a 1U server, and maybe that isnt broken...

OTW, I am forced to recreate. I smell a null string in the data store. Not likely to correct that problem. Restore methodology must be improved to incorporate importing single maps, or other groupings of devices. That way I could have a clean copy of all the objects, that I know are stable, and only restore known good template objects. This can be accomplished by a shaky manipulation of XML data, hopefully avoiding the corrupt data...

Thats what I think. I think Normis should tell us when the 'Selective Import' feature will be implemented...Thats what I think... :shock:

Who is online

Users browsing this forum: Amazon [Bot] and 57 guests