Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Ninja Scripts failed to restore from backup!

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Ninja Scripts failed to restore from backup!

    Hello. I regularly back up my NT settings (everything including the NT scripts) on to a USB stick in case my PC develops a problems and I have to use another PC or laptop. That situation just occurred and I basically ended up losing all the data on my hard drive. I just tried to restore my backed up NT settings on my laptop and it would appear everything was successfully installed except my scripts, came up with the following message "NinjaScripts files can't be restored, since they would corrupt your installation"

    I am quite unhappy as now I have lost all my NT Scripts that I have worked so hard to code. I thought that was the purpose of the back-up!

    #2
    Hello rabcnesbit,

    This can be common when moving a backup from PC to PC if you ever use custom assemblies. The references to these assemblies will use a hard coded directory path for your user directory (My Documents) and this is often not the same one pc compared to another. The backup won't restore these files as it would lead to compile errors. We understand this is not an ideal scenario for backups and are looking into possible changes in this.

    All your NinjaScript files are still in tact (the backup file is actually just a standard .zip archive). We'd be happy to work with you over remote assistance to help recover these items for you. To arrange this, please send a note to support 'at' ninjatrader 'dot' com. Include your phone number, a good time to reach you, and a link to this thread.
    Ryan M.NinjaTrader Customer Service

    Comment


      #3
      Ninja Scripts restore problems, similar issue

      Restoring a backup to the same computer setup where it was saved,
      I received these error messages that seem similar to Rabcnesbit's errors:

      "NinjaScript files can't be restored, since they would corrupt your installation."

      and in the Restore Backup Archive summary:
      ...
      "- WARNING: NinjaScript files NOT restored"
      ...

      Could you give me a bit more detail about identifying the files we are dealing with
      and their locations. Where exactly should they be so this error does not occur again?
      Once we locate the files, is the solution to copy them to the correct location and reload them into NinjaTrader?

      I would like to correct whatever is necessary so a complete backup and restore becomes possible without these errors.

      Thanks,
      Steve

      Comment


        #4
        This indicates there are errors on the PC where backup was created. First on the PC the backup was created please follow the instructions below to see where the errors are coming from after compiling the indicator. This will allow you to debug the indicator/strategy or remove it from your PC. If you are wondering why you receive an error when compiling only one indicator, it is because NinjaTrader always compiles all indicators and strategies - not just one. This is done to give you the highest runtime performance possible.
        • Open NinjaTrader
        • From the Control Center select the Tools menu--> select the Edit NinjaScript menu item--> select Indicator
        • Select any indicator and double click on it (we need only to open and compile one script to see all compile errors for all files).
        • A new window will appear and you will need to right click in the window and select Compile to compile the indicators.
        • At the bottom of the window a new section will appear where you can find the error locations.
        • From there you have the option to comment out offending code sections, remove the complete indicator or debug it to be able to compile again.
        If you are unsure as to what the error is indicating, please send me a screenshot of the error with the name and description fields clearly readable.

        To send a screenshot press Alt + PRINT SCREEN to take a screen shot of the selected window. Then go to Start--> Accessories--> Paint, and press CRTL + V to paste the image. Lastly, save as a jpeg file and attach the file to your reply.

        We have also collected more comprehensive steps for resolving NinjaScript programming errors in this tip on our forums



        After all errors have been resolved please create a new Backup then Restore using this file.
        Christopher J.NinjaTrader Customer Service

        Comment


          #5
          Originally posted by NinjaTrader_ChristopherJ View Post
          This indicates there are errors on the PC where backup was created. First on the PC the backup was created please follow the instructions below to see where the errors are coming from after compiling the indicator. This will allow you to debug the indicator/strategy or remove it from your PC. If you are wondering why you receive an error when compiling only one indicator, it is because NinjaTrader always compiles all indicators and strategies - not just one. This is done to give you the highest runtime performance possible.
          • Open NinjaTrader
          • From the Control Center select the Tools menu--> select the Edit NinjaScript menu item--> select Indicator
          • Select any indicator and double click on it (we need only to open and compile one script to see all compile errors for all files).
          • A new window will appear and you will need to right click in the window and select Compile to compile the indicators.
          • At the bottom of the window a new section will appear where you can find the error locations.
          • From there you have the option to comment out offending code sections, remove the complete indicator or debug it to be able to compile again.
          If you are unsure as to what the error is indicating, please send me a screenshot of the error with the name and description fields clearly readable.

          To send a screenshot press Alt + PRINT SCREEN to take a screen shot of the selected window. Then go to Start--> Accessories--> Paint, and press CRTL + V to paste the image. Lastly, save as a jpeg file and attach the file to your reply.

          We have also collected more comprehensive steps for resolving NinjaScript programming errors in this tip on our forums



          After all errors have been resolved please create a new Backup then Restore using this file.
          Thank you Christopher,

          That process located the problem (a recently added indicator) and allowed me to correct it's internal problems (a missing .cs file).
          I found it interesting that even when I had tried to restore backups prior to the
          existence of the file causing the compile error, the same problem
          (mentioned previously) kept occurring.
          Does that mean that a restore will not restore the 'compiled' portion of Ninja from the backup if it already exists?

          Thanks again,
          Steve

          Comment


            #6
            Correct if there are errors within the NinjaScript files from the original PC the NinjaScript portion of the Backup will not be included when attempting to Restore.

            After resolving the error on the original PC then creating a new Backup are you able to Restore on the other PC using this newly created file?
            Christopher J.NinjaTrader Customer Service

            Comment


              #7
              Yes, both a new backup and subsequent restore worked perfectly after correcting the internal problems with the script. This is all been on the same PC.

              Steve

              Comment


                #8
                I have 2 PC's my main trade PC and a laptop that I experiment with studies to make sure they work and don't corrupt. then i transfer the indicator only to main Trade PC. Well my laptop got corrupted with bad script and would like to restore Ninja from Main PC back up instead of redoing ninja all over again.
                My main Trade PC works when I restore but when I try to use the same back up to restore Laptop I get the Cant restore Ninja Script error .

                Is there a way to restore my Laptop from main Trade PC ?

                Thank You

                Curtis

                .

                Comment


                  #9
                  Are you receiving errors from the local PC on compile errors or from the restore?
                  Cal H.NinjaTrader Customer Service

                  Comment


                    #10
                    first screen error i get http://screencast.com/t/nefojmXk

                    then this http://screencast.com/t/jg6jjZPgQ

                    Comment


                      #11
                      Hi,

                      There may be some reasons that will prevent your NinjaScript files from being restored. If you wish to restore these from one PC to another, and your environment settings have changed, you will need to manually export and import your custom indicators:



                      You can always contact us at support[at]ninjatrader[dot]com and we'll be happy to help you over a live remote session to assist you with this process.
                      MatthewNinjaTrader Product Management

                      Comment


                        #12
                        Ninja script restore

                        Originally posted by NinjaTrader_Matthew View Post
                        Hi,

                        There may be some reasons that will prevent your NinjaScript files from being restored. If you wish to restore these from one PC to another, and your environment settings have changed, you will need to manually export and import your custom indicators:



                        You can always contact us at support[at]ninjatrader[dot]com and we'll be happy to help you over a live remote session to assist you with this process.
                        This weekend my trading machine accepted a critical MS Win7 update which wiped out NT platform. I not had any issues with non-compiled indicators prior to this issue and have been using the NT backup monthly. After the trading machine OS was reinstalled, I attempted to restore my NT platform, and received the same error message...Ninja Scripts failed to restore from backup. I tried to restore with the previous NT version to no avail.

                        The backups were completed on the same machine as the attempted restores.

                        I contacted support at Ninjatrader.com and it was suggested I contact third party vendors and reinstall the ninja scripts.

                        If the *.bak is a zip file, can I access the ninja scripts that failed to restore and reinstall them individually? Can you assist me with this challenge?

                        Comment


                          #13
                          kvankuren,

                          Yes, you can rename the .NTBK file to .ZIP in order change the file type and then be able to open up or extract the files that you need.

                          Select the backup, right click on it and select Rename
                          Cal H.NinjaTrader Customer Service

                          Comment


                            #14
                            Cal -

                            This is an elementary follow-up questions...where do I extract the files of the unrestored ninja script?
                            Can you please provide further details?
                            The NTBK file appears to have originated from the Documents>NinjaTrader7 directory.
                            With Ninja Trader closed, i decompress the zip files into the respective directories, and restart NT7 to recompile?
                            What can I do differently to make a successful backup that will restore Ninja Script files in the future?

                            Thanks for the assistance.
                            K

                            Comment


                              #15
                              You would want to replace the bin folder in the NinjaTrader 7 folder with the one from the extracted files.

                              You would need to replace the config.xml file as well for the references.

                              I would then launch NT and check your NinjaScripts for any compile errors

                              Tools -> Edit NinjaScript -> Indicator -> Select any indicator -> Compile.
                              Cal H.NinjaTrader Customer Service

                              Comment

                              Latest Posts

                              Collapse

                              Topics Statistics Last Post
                              Started by ScottWalsh, Today, 04:52 PM
                              0 responses
                              1 view
                              0 likes
                              Last Post ScottWalsh  
                              Started by ScottWalsh, Today, 04:29 PM
                              0 responses
                              5 views
                              0 likes
                              Last Post ScottWalsh  
                              Started by rtwave, 04-12-2024, 09:30 AM
                              2 responses
                              22 views
                              0 likes
                              Last Post rtwave
                              by rtwave
                               
                              Started by tsantospinto, 04-12-2024, 07:04 PM
                              5 responses
                              70 views
                              0 likes
                              Last Post tsantospinto  
                              Started by cre8able, Today, 03:20 PM
                              0 responses
                              7 views
                              0 likes
                              Last Post cre8able  
                              Working...
                              X