Backup using hotcopy

kolaboykolaboy Member Posts: 446
Hi All,

In SQL Server there is an option of taking the automatic database
backups either weekly/daily. But how far the hotcopy in navision is
useful in it.

And how to use it for taking the database backup automatically. I
have tried it, but it's not working fine. Do any one have the user
manual for this or can tell me the steps to follow systematically?


Thanks in advance.

Comments

  • PoltergeistPoltergeist Member Posts: 200
    Hotcopy is a commandline program, which means you can start it manually, but also by means of the Windows Task-Scheduler. Best way to do it is to create a textfile with all the settings, create a batch file with the command 'hotcopy source=textfile' and schedule this batch file.

    That's really all there is to it.
  • krikikriki Member, Moderator Posts: 9,110
    Hotcopy is for a Navision DB only. If you work on a SQL DB, use the SQL-backup.
    Regards,Alain Krikilion
    No PM,please use the forum. || May the <SOLVED>-attribute be in your title!


  • kolaboykolaboy Member Posts: 446
    i am using Navision DB.

    I try using Hotcopy but i am having the following Error:
    The system cannot find the file specified at System.Diagnostics.Process.StartWithShellExecuteEx(ProcessStartInfo startInfo)
    at System.Diagnostics.Process.Start()
    at HotCopy_Shell.myProgram.ExecuteHotCopy(String DateText, String TimeText, String Source, String Destination, String Servername, String Nettype, String Dbtest, Boolean Consistencycheck, Boolean OSAuthentication, String UserID, String Password, String Description, String Email)
    Is there anything the problem.
    Thanks.
  • PoltergeistPoltergeist Member Posts: 200
    From where are you trying to start HotCopy? Seems you are using a shell from another program to start the HotCopy executable. Perhaps you are using the HotCopy Shell from Savatage's message? This program and the Hotcopy.exe need to be in the same directory I believe.

    Hotcopy.exe is on the server, in the directory where the server software is installed. It cannot be placed in any other directory.
  • kolaboykolaboy Member Posts: 446
    I saw Hotcopy in the directory where the server is, but i don't know how to go about it.
    You are right i use savatage Hotcopy Shell. i was trying to install it.

    Now since it is already there, How can i go about with the schelduling of the backup. Honestly i don't know what to do. I need somebody to explain to me in step by step form how to definitely go about with this.I will appreciate it very much if i can have the explain step by step, since i can't lay my hands on the documentation. The one on the product CD is scanty.
    Thanks.
  • PoltergeistPoltergeist Member Posts: 200
    edited 2007-08-06
    Create a textfile in the same directory hotcopy is in. Give it any name you like. I'll call it hotcopy.txt

    In this file you have to create two sections. The first section is called [Backup Files]. In here you name all databaseparts and where they should be copied to. The line (or lines, with multiple database parts) should look like this:
    <full path and filename of databasefile>=<full path of backuplocation>
    

    In the next section, called [Options], you set the various options. The available options are:

    Dbtest= (minimum, normal, maximum) to test the database. Don't use maximum, it will always fail.
    Cc=(yes or no) to do a consistency check after the backup has been created
    Servername=(NetBios name, IPaddres, ifnecesarry, with portnumber) to indicate the server
    Nettype=(TCP, Netb or TCPS) to tell what network protocol you're using
    user=(Navision user name) to log in to the navision database. Use this when using database authentication. When using Windows Authentication, omit this line.
    password=(Navision user password) to log in to the navision database. Use this when using database authentication. When using Windows Authentication, omit this line.
    OSAuthentication=YES. Use this only if you are using Windows Authentication, otherwise don't use it. I prefer to use database authentication
    Email=(email address) to send an e-mail. An e-mail (for example, Outlook) client has to be installed
    Description=(some text) to give a description of the backup

    A sample file could look like this:
    [Backup Files]
    C:\data\40SP2\database.fdb=C:\Backup
    
    [Options]
    Description=Daily backup
    Dbtest=normal
    Cc=Yes
    Servername=localhost:2408
    Nettype=TCP
    User=backup
    Password=backup
    

    Now, go to the command prompt, go to the server directory, and type the following command:

    hotcopy source=hotcopy.txt

    If everything is allright, the backup should be made. If not, a clear errormessage is given.

    Now, you can go to the Windows Task Scheduler. Create a new schedule, with the command hotcopy source=hotcopy.txt

    This should work.

    BTW, all information is very clear in the w1w1ism.pdf file (at least in the 5.0 docs)
  • SavatageSavatage Member Posts: 7,142
    Savatage wrote:

    I just tried this - alwasy seen it - figured it was easy - but It's no walk in the park. It's in dire need of step by step setup instructions.

    Poltergeists' suggestion is much easier!
  • PoltergeistPoltergeist Member Posts: 200
    Well, the hotcopy shell uses a bit different way to work. I must say I think it's not that difficult, but you have to know what to fill in. there are the same options as in my previous post. However, it is no scheduler, so it's only usefull (IMHO) if you want to make an occasional copy. I do use it myself if I want to make a quick backup at a clients place. Only real disadvantage is that .net framework 2.0 has to be installed.

    What the hotcopy shell does is not making use of a description file (like I explained), but it uses the commandline option. With Hotcopy, all options can also be set on the commandline.

    If you fill out all the data in the HotCopy shell, in the box next to the plus sign, you'll see the commandline the shell uses to execute hotcopy. You could copy this line into a batch file (don't forget to replace the **** of the password with the real password) and start this batch file. It should have the same effect.

    BTW, the errormessage kolaboy received is indeed due to the fact that the hotcopy.exe is not in the same directory.
  • kolaboykolaboy Member Posts: 446
    thanks to all of you. i will try your suggestions and anything that comes up i will you Know.
Sign In or Register to comment.