Automate Backup of 2009 native database

Hi

I have one client that is still running on the 2009 native database. They will be upgrading in January to 2017. Till now I have been using HotCopy which works well but the file size after compression is 2.5gb. A compressed fbk is only 161mb. I would like to automate the FBK backups and upload them to the cloud.

There is a wonderful script that I found on Mibuso, and it works perfectly to run the backup, but it runs from a form.
http://forum.mibuso.com/discussion/21430/autobackup-from-navision-client-not-nas

I tried to create a CU using similar code, but the timer never executes and I have no idea why!!! I'm really out of my depth here. Any suggestions, other than buying ExpandIt, would be really appreciated.

OnRun()
Description := STRSUBSTNO(Text0002,TODAY);
Filename := STRSUBSTNO(Text0005,TODAY);

IF ISCLEAR(WSHShell) THEN
CREATE(WSHShell);

IF ISCLEAR(Timer) THEN
CREATE(Timer);

Timer.Interval(100);
Timer.Enabled(TRUE);

Timer::Timer(Milliseconds : Integer)

IF NOT ShellIsSend THEN BEGIN
WSHShell.SendKeys('%tb');
ShellIsSend := TRUE;
BEEP(440,100);
END ELSE BEGIN
IF NOT ShellIsSend2 THEN BEGIN
WSHShell.SendKeys(Description);
WSHShell.SendKeys('{DOWN}');
WSHShell.SendKeys(Filename);
WSHShell.SendKeys('{DOWN}');
WSHShell.SendKeys('{Enter}');
WSHShell.SendKeys('{Enter}');
ShellIsSend2 := TRUE;
Timer.Enabled(FALSE);
END;
END;


Thanks - Noeline

Comments

  • JuhlJuhl Member Posts: 724
    Maybe think outside Navision.
    Using backup software or remote backup that supports volume shadow copy and compression, and backup the database directly.
    Follow me on my blog juhl.blog
  • NoelineNoeline Member Posts: 54
    I'm already achieving that with HotCopy. I need the condensed .fbk backup that only has data.
  • da_nealda_neal Member Posts: 76
    Make your codeunit SingleInstance = Yes
Sign In or Register to comment.