.
Results 1 to 12 of 12

Thread: How to restore from Backup Folder

  1. #1
    Join Date
    Nov 2006
    Location
    Australia, Western Australia, Busselton
    Posts
    405
     

    Default How to restore from Backup Folder

    G'day,

    How do I recover a particular KUID after a System Crash from the Backup Folder.

    After all these years, I have never needed to recover from a Trainz backup, blushing.

    silvergull

    Michael
    Last edited by silvergull; January 18th, 2020 at 12:02 AM. Reason: More Info

  2. #2
    Join Date
    Nov 2006
    Location
    Australia, NSW, Sydney
    Posts
    6,296
    Blog Entries
    3
     

    Default

    Have not had to do this for years - but a Google search soon found it in the Trainz Knowledge base at https://support.trainzportal.com/ind...f-your-content

    Short steps:
    • Take a manual backup onto disk/usb etc prior to initiating these steps
    • Navigate to the backup folder in your local data folder
    • Find the most recent backup (or one dated around the time you think you are looking for) and drag the folder into Content Manager
    • Submit the Asset (since it will be Open for Edit when you import it)
    • Right-click and Edit In Surveyor to check on your newly installed backup is the one you are after



    Steps in More Detail:

    • Make a manual backup onto disk/usb etc prior to initiating these steps
    • Navigate to the backup folder in your local data folder (the path can be found looking in the Install tab of Launcher > Trainz Settings)
    • The top level has the last 7 days activity in YY-MM-DD folders (this could be 1 day or weeks apart)
    • Inside each daily activity folder is the list of backuped up content for that day
    • The folder organisation is controlled by your Windows Settings
    • If you know the time of the backup you are looking for, sort by time, or if you know the KUID, sort by Name
    • Note that some backup files are "randomized" names, so you will need to search by date and time
    • The backup folder contains copies of your own edits and files you have downloaded (anything that was updaed in the database)
    • When you find a file that you suspect may be the one that you wish to restore, then drag the folder from the Windows Explorer folder into Content Manager
    • An install log will be generated that looks something like the following:

    ; TrainzWorkerBatch
    ; Will install from path: C:/Users/New/AppData/Local/N3V Games/TANE/80276/backups/16-03-04/kuid 39601 100131 abc
    ; TrainzWorkerBatch
    ; TADInstallAssetFromPath
    ! Asset <kuid:39601:100131> is already installed.
    + <kuid:39601:100131> opened for edit
    ; Wrote <kuid:39601:100131> to disk
    ; Skipped commit for <kuid:39601:100131>
    + Installed asset <kuid:39601:100131>

    • Click Submit Edits to submit the item to the database
    • Click Edit in Surveyor to check on your newly installed backup to ensure it is the one you are after
    • If this version is still corrupt, then you will need to go through the folders looking for an older version that is saved prior to the corruption occurring.



    Handling TZARC folders:

    • Sometimes the item you want to restore will be saved in tzarc format
    • In this case, find the .tzarc folder in your backup folder (it will have a name like kuid2 438196 1187 1.tzarc)
    • This could be a builtin item or 3rd party item
    • We now need to drag or copy the .tzarc file using Windows Explorer into your "local" Folder that is in the same directory as your "backups" folder (this is the important part - you cannot drag a .tzarc file into Content Manager)
    • Then click Launcher > Developer > Rebuild Database
    • Once the repair has finished, review the restored version to check everything is restored correctly
    TRS19 Platinum 105100 - TRS19 SP1 (standard) 105096 - TANE SP4 105766

  3. #3
    Join Date
    Nov 2006
    Location
    Australia, Western Australia, Busselton
    Posts
    405
     

    Default

    G'day pware,

    Thanks for the info, saved a lot of heartache.


    silvergull

  4. #4
    Join Date
    Nov 2006
    Location
    Australia, NSW, Sydney
    Posts
    6,296
    Blog Entries
    3
     

    Default

    There is now a page on the Trainz Wiki dealing with making and restoring backups in Trainz. The page can be found at http://online.ts2009.com/mediaWiki/i...Manage_Backups
    TRS19 Platinum 105100 - TRS19 SP1 (standard) 105096 - TANE SP4 105766

  5. #5
    Join Date
    Nov 2006
    Location
    United States of America, Massachusetts, Haverhill
    Posts
    26,392
     

    Default

    This utility is helpful for handling the tzarc files.

    TZarchiver

    https://www.tapatalk.com/groups/vvmm/software-f56/

    Drag the .tzarc file into one side and you can view the inside and extract the contents to a folder in the same location as the original is located. With that, I recommend copying the .tzarc you want to extract to another location and run the utility from there. With the extracted data now in a folder, you simply drag the folder, or use File-Import folder in Content Manager. There's no need then to do a database repair.
    John
    Trainz User Since: 12-2003
    Trainz User ID: 124863
    T:ANE Build: 94829
    TRS2019/Trainz-PLUS: 105100

  6. #6
    Join Date
    Nov 2007
    Location
    United States of America, Pennsylvania, Murrysville
    Posts
    3,477
     

    Default

    Wouldn't it just be easier, and more responsible, for N3V to code a simple process in Visual Basic?

    Usually, when a customer is doing the backup it is a stressful situation. A mistake can really cause more angst.
    A tool protects the customer from themselves and makes them a valuable marketing advocate.
    Dick near Pittsburgh, Pa. i5-2500K 4.3ghz, 8gb memory, GTX1060 4gb video card

  7. #7
    Join Date
    Nov 2007
    Location
    United States of America, Pennsylvania, Murrysville
    Posts
    3,477
     

    Default

    Today I discovered that a route I had spent time on completely disappeared. The only backup is the builtinn backup process. I followed the Wiki instructons but when it came to draggin the selected folder to the Content Manager the Content Manage would not allow it and showed a circle with a line diagonally through the circle.

    Wiki Instruction:

    Step 3: Restore the Backup To Trainz
    1. open Content Manager
    2. drag and drop the selected backup folder from Windows File Explorer into Content Manager
    3. the item will be shown in Content Manager as Open for Edit. Select the item and Submit it.


    I can see no way to use this process. Perhaps someone who has had success can help...
    Last edited by boleyd; January 22nd, 2020 at 03:03 PM.
    Dick near Pittsburgh, Pa. i5-2500K 4.3ghz, 8gb memory, GTX1060 4gb video card

  8. #8
    Join Date
    Nov 2006
    Location
    Australia, NSW, Sydney
    Posts
    6,296
    Blog Entries
    3
     

    Default

    Quote Originally Posted by boleyd View Post
    I can see no way to use this process. Perhaps someone who has had success can help...
    Just a few days ago I followed those steps exactly and it worked perfectly. Could it be that CM decided that the selected backup was faulty or somehow incompatible?

    The Trainz Knowledge Base at https://support.trainzportal.com/ind...f-your-content has additional troubleshooting instructions including how to extract the backup from the tzarc file.
    TRS19 Platinum 105100 - TRS19 SP1 (standard) 105096 - TANE SP4 105766

  9. #9
    Join Date
    Nov 2006
    Location
    United States of America, Massachusetts, Haverhill
    Posts
    26,392
     

    Default

    Quote Originally Posted by boleyd View Post
    Wouldn't it just be easier, and more responsible, for N3V to code a simple process in Visual Basic?

    Usually, when a customer is doing the backup it is a stressful situation. A mistake can really cause more angst.
    A tool protects the customer from themselves and makes them a valuable marketing advocate.
    Yes and definitely!

    But that would be too easy and take the Geekpower away. (snark)
    John
    Trainz User Since: 12-2003
    Trainz User ID: 124863
    T:ANE Build: 94829
    TRS2019/Trainz-PLUS: 105100

  10. #10
    Join Date
    Nov 2006
    Location
    Australia, NSW, Sydney
    Posts
    6,296
    Blog Entries
    3
     

    Default

    Quote Originally Posted by boleyd View Post
    Usually, when a customer is doing the backup it is a stressful situation. A mistake can really cause more angst.
    A tool protects the customer from themselves and makes them a valuable marketing advocate.
    Making backups should be a part of everyone's normal routine and certainly not something that is stressful. I make manual backups of all my important files (not just Trainz) whenever I make a change to those files. There are software tools that will monitor nominated folders and files and perform backups automatically whenever a change has been detected.

    The problem with Trainz is that those changes occur inside a database and only those updated/edited/added database records (assets) need to be backed up, not the entire 60GB+ of data. So a backup tool would most likely have to be built into the Trainz code like the current automatic backup system. A simple external VB addon may not be sufficient.

    With Trainz I use a manual backup system where I create .cdp backups of the assets I have edited - mostly, but not only, routes and sessions. I find this to be satisfactory and I have gotten into the habit of performing a backup whenever I exit Surveyor.
    TRS19 Platinum 105100 - TRS19 SP1 (standard) 105096 - TANE SP4 105766

  11. #11
    Join Date
    Nov 2007
    Location
    United States of America, Pennsylvania, Murrysville
    Posts
    3,477
     

    Default

    Pware: "I have gotten into the habit of performing a backup whenever I exit Surveyor."

    Perhaps that is the answer. Rather than using the existing auto-system it should be simple to code in the closing routine a Yes/NO to backup the current route file. Keep it simple and do not attempt to customize it with a lot of WHAT/IF junk for special situations. Copy the route, in CDP format, to a specific folder within the N3V folder. NO OPTIONS. It is important to always keep backup processes rigid and devoid of frills.

    Now there may be problems I am unaware of. But the payed time for someone to research a flow-chart, and which file to save, should not be too difficult.
    Dick near Pittsburgh, Pa. i5-2500K 4.3ghz, 8gb memory, GTX1060 4gb video card

  12. #12
    Join Date
    Nov 2006
    Location
    United States of America, Massachusetts, Haverhill
    Posts
    26,392
     

    Default

    Quote Originally Posted by boleyd View Post
    Pware: "I have gotten into the habit of performing a backup whenever I exit Surveyor."

    Perhaps that is the answer. Rather than using the existing auto-system it should be simple to code in the closing routine a Yes/NO to backup the current route file. Keep it simple and do not attempt to customize it with a lot of WHAT/IF junk for special situations. Copy the route, in CDP format, to a specific folder within the N3V folder. NO OPTIONS. It is important to always keep backup processes rigid and devoid of frills.

    Now there may be problems I am unaware of. But the payed time for someone to research a flow-chart, and which file to save, should not be too difficult.
    I do the same along with larger full backups of my data to an external drive. Knocking on wood, meaning my head and not my table, this has been a savior more than once as my backups have come to the rescue.

    I agree keeping this in the KISS mode is best. The route or session.cdp file can be saved to the current backups folder. The files need a name-date-timestamp so that they can be reverted to.

    Way back in the ancient times, I used 3d Studio- R4 for DOS. This program had a + button next to the file/project open dialog box. This was to open up the file and create a backup version in case things didn't go as planned. On the Varityper system, opening up any previously created file automatically created a backup, and there was a dialog box simply asked whether to delete the previous version. Since these files were time-tracked rather than file-name-tracked, there could be multiple iterations of the same file with only the date and time differentiating between them.
    Last edited by JCitron; January 23rd, 2020 at 11:43 AM.
    John
    Trainz User Since: 12-2003
    Trainz User ID: 124863
    T:ANE Build: 94829
    TRS2019/Trainz-PLUS: 105100

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •