1 2 Previous Next 21 Replies Latest reply on Nov 19, 2019 3:56 AM by Mark Francome

    Control M HotBackup

    Helmut Hehenberger
      Share This:

      Hi everybody

       

      I have Contorl-M installed in windwos environment with Postgres db. I try to run HotBackup and following error comes up:

       

      Backup in progress, please wait..
      AP-10 - Execut Script Module: 4 - Failed to open tmp file

       

      Script:

      E:\Program Files\BMC Software\Control-M Server\ctm_server\exe\DBUtils\DBUHotBackup.exe" -BACKUP_DIRECTORY E:\CTM_BACKUP\WeeklyBackup\%Datetime%\ -ADMINISTRATOR_PASSWORD XXXXXX -REMOVE_UNNECESSARY_LOGS N

       

       

      Any help will be greatly appreciate.

       

      Regards

      Helmut

        • 1. Re: Control M HotBackup
          Ilyas Shaikh

          Hi Helmut,

           

          I found below in Control-M message guide under Control-M/Server messages:

           

          AP- 10 Execute Script Module: 4 - Failed to open output tmp file

          Explanation: A Control-M database utility fails to open a temporary file.

          Corrective Aciton: Contact BMC Customer Support

           

          Can you try with double quotes for backup directory path to check if it works.

           

          Regards,

          Ilyas Shaikh

          • 2. Re: Control M HotBackup
            Helmut Hehenberger

            Hi Ilyas,

             

            after double quotes backup directory I have to insert Admin pwd and remove logs param manually.

            After inserting params following error comes up:

            AP-11 - Validation of Input Parameters Modue: 9 - Failed to check directory

             

            Regards

            Helmut

            • 3. Re: Control M HotBackup
              Mark Francome

              I am suggesting the obvious here (I don't have the same config as you) but would it be an idea to replace the %Datetime% variable with a string to represent that? Just to take that out of the list of possible issues.

               

              Also, how do you find the PostgreSQL with Windows? I am a big fan of using the BMC-supplied PostgreSQL DB but have no recent experience of using Windows to host the Control-M Server.

              • 4. Re: Control M HotBackup
                Helmut Hehenberger

                Hi Mark,

                yes that was also my idea but no success with it same issue after removing %Datetime%.

                 

                I'm not the admin in our company but as far as I can see PostgeSQL with Windows is running fine(except HotBackup )

                 

                Regards

                Helmut

                • 5. Re: Control M HotBackup
                  MunKeong Lee

                  Hi Helmet

                  Add the option "-trace_level info" to the command line and execute the command again. This will increase the level of details in the log file.

                  After the command has failed, go to the folder, "E:\Program Files\BMC Software\Control-M Server\ctm_server\exe\DBUtils\DBUdata\log and view the latest DBUHotBackup*.log file. Hopefully, it will show you the cause of the error. Please post the contents of the log file if you need further assistance.

                   

                  Regards,

                  MK 

                  1 of 1 people found this helpful
                  • 6. Re: Control M HotBackup
                    Helmut Hehenberger

                    Hi MK,

                     

                    C:\CTM_BACKUP\BackupScript>"C:\Program Files\BMC Software\Control-M Server\ctm_server\exe\DBUtils\DBUHotBackup.exe" -BACKUP_DIRECTORY C:\CTM_BACKUP\WeeklyBackup\ -ADMINISTRATOR_PASSWORD XXXXXX -REMOVE_UNNECESSARY_LOGS N -trace_level info

                    Please wait...

                    Backup in progress, please wait...

                    AP-10 - Execute Script Module: 4 - Failed to open output tmp file

                     

                    After command failed no logfile was created in the mentioned directory, btw there is no DBUHotBackup*.log in this folder.

                     

                    Regards

                    Helmut

                    • 7. Re: Control M HotBackup
                      MunKeong Lee

                      Hi Helmut

                      Which user account are you using to execute the hot backup? Could it be that this account does not have any rights to create files in the Control-M directory. Try using an administrator account to execute the command again to see whether it works.

                       

                      Regards,

                      Mun Keong

                       

                      Lee Mun Keong

                      Managed Objects

                      Mobile: +65 97498081

                      1 Scotts Road #24-10

                      Shaw Centre

                      Singapore 228208

                      Singapore

                      • 8. Re: Control M HotBackup
                        Mahendra Vakati

                        Helmut,

                         

                        Check the registry value of "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\FileSystem\NtfsDisable8dot3NameCreation".

                         

                        If the registry key NtfsDisable8dot3NameCreation in Windows is set to a value of 1 then this disables the creation of short names for files and directories that are created. it uses ~ sign and remove the spaces in the names of files and directories.

                         

                        Control-M uses short names when creating and accessing files in Windows. So, set the registry key to 0, reboot the Windows machine and then try again.

                        • 9. Re: Control M HotBackup
                          Helmut Hehenberger

                          Hi Lee Mun,

                           

                          with admin account I got a .log with following error:

                          Error:

                          VB-1100 - VB-1100 could not copy pgsql to backup directory, check robocopy log: %TEMP%\dbu_hot_backup\_err_D_M_YYYY_TIME

                           

                          For that I found some documenation which I'll follow

                           

                          https://communities.bmc.com/docs/DOC-65997

                           

                          I'll let you know if it works.

                          Thx for your help so far.

                           

                          Regards

                          Helmut

                          • 10. Re: Control M HotBackup
                            Helmut Hehenberger

                            Hi,

                             

                            after changing like mentioned in DOC-65997 I got the same erorr as before.

                            Error: VB-1100 - VB-1100 could not copy pgsql to backup directory, check robocopy log

                             

                            Steps what I've done:

                            - Backup the dbu_hot_backup.vbs script

                            - Edit the dbu_hot_backup.vbs script by updating the 4 double quotes("""") to 2("") as below:

                              From:

                              res=WshShell.Run("robocopy " & """" & archive_dir & ....

                              To:

                              res=WshShell.Run("robocopy " & "" & archive_dir & .....

                            - Save the file and rerun the hot backup again

                            NOTE: When saving the file after above change, ensure the original encoding 'UTF-8' is not changed to other encoding. Otherwise the script will failed with compilation error when executed.

                             

                            Any ideas?

                             

                            Regards

                            Helmut

                            • 11. Re: Control M HotBackup
                              MunKeong Lee

                              Hi Helmut

                              Below is the delete_old_log_files_with_robocopy function from the vb script taken from V9.0.18 which supposedly solve this error. Try copying the relevant portion to your script. Hopefully it works.

                               

                              function delete_old_log_files_with_robocopy(archive_dir)

                               

                               

                                   err.clear

                                   'start error handling

                                   on error resume next

                                   '''first, let's create directory in %TEMP% (to contain old files, and to be deleted)         

                                   Wscript.Echo "creating logs_to_delete directory in %TEMP%..." 

                                   Set MyFile = fso.CreateFolder(OLD_LOGS_DIR)         

                                  

                                   ''if (err.number <> 0 )then

                                   ''      

                                   ''       report_on_error(" could not create logs_to_delete directory, error id: " & err.number & ", " & err.description)

                                   ''       MyFile.Close

                                   ''       WScript.Quit 1

                                   ''end if

                                  

                                   MyFile.Close

                                       

                                   Wscript.Echo "going to execute:"

                                   Wscript.Echo "robocopy " & """" & archive_dir & """" & " " & """" & OLD_LOGS_DIR & """" & " /move /minage:7"

                                  

                                   res=WshShell.Run("robocopy " & """" & archive_dir & """" & " " & """" & OLD_LOGS_DIR & """" & " /move /minage:7",1,true)

                                   '' In some Windows, it worked for this (archive_dir came with extra comma). Here we do two copies for now, you can never be too careful... 

                                   res=WshShell.Run("robocopy " & "" & archive_dir & """" & " " & """" & OLD_LOGS_DIR & """" & " /move /minage:7",1,true)                             

                                       

                                   Set MyFile = fso.GetFolder(OLD_LOGS_DIR) 

                                   MyFile.Delete     

                                  

                                   'stop error handling

                                    on error goto 0

                                  

                              end function

                              3 of 3 people found this helpful
                              • 12. Re: Control M HotBackup
                                Helmut Hehenberger

                                Hi,

                                 

                                sorry may I forgot to tell that we have V9.0.18 installed so that part is already in that script.

                                 

                                Regards

                                Helmut

                                 

                                • 13. Re: Control M HotBackup
                                  Helmut Hehenberger

                                  Hi all,

                                   

                                  backup is now working. It seems the problem was the \ at the end of the directory.

                                   

                                  Thx for you help.

                                   

                                  Regards

                                  Helmut

                                  • 14. Re: Control M HotBackup
                                    MunKeong Lee

                                    Great. Good to know that you have managed to find the issue.

                                    1 2 Previous Next