How do I avoid losing route work?

RobWed

Active member
Over the last three days I've spent a considerable amount of time working on a route. I have options set to do 7 backups a day. Both yesterday and today the route has just disappeared. Yesterday I went to look at backups but it was so old it really wasn't worth the effort so I just started again from scratch. Today there is no .tzarc file at all. There is a folder with the right asset number but all the timestamps on the files inside are yesterday's. Today I was saving both route and session regularly and I thought I was doing pretty well with which elements I was assigning to the route and which to the session. So wtf happenened to the 7 backups?

I would like to understand what it is that is causing the problem and would like to understand the appropriate protocols to put in place to ensure it doesn't happen again.
 
Its not bad but I don't rely on others doing my backups. At the end of each build session, whether its half hour or half a day, but before turning the computer off, I export the route I'm working on with its sessions as a .cdp file to a USB stick, numbering them in date order sequence in a directory of the routes name i.e. for today as 20250121-01...02...03 and so on. Admittedly I have only saved the route and its sessions but if all else fails I can download and/or reinstall everything again but still have my route with all the effort I put into it. Peter
 
Nothing gives you more confidence and peace of mind than doing the backups yourself. After each editing session I save my work (the route and, if applicable, the session) as .cdp files on multiple external storage devices (because I am paranoid).

There is a wiki page devoted to the subject of making backups. See How_to_Manage_Backups. Scroll down to the section on Creating Manual Backups.
 
Funny how most every game on the planet has save game functionality down pat. I save, there's a save file. This is the only game I'm aware of that decides it'll delete a save. Left all my sessions of course. Almost as if it was giving me the finger.

Lesson learned.
 
This is the only game I'm aware of that decides it'll delete a save.
In my 20+ years of using Trainz I have never experienced that.

In Trainz a save (route, session, asset) is stored as a record in its database, just like all the database management programs I have ever used. That means everything is in the one location (your User Data Folder which can be moved and duplicated if required) and that makes management and loading much faster. The first versions of Trainz stored everything (all routes, sessions and assets) as separate files that had to be loaded individually which slowed things down to the point that complaints from users (us) were common.

You have always had the option of saving (routes, sessions, assets) as separate independent .cdp files which is what I always do. As well as a providing a backup of individual resources the .cdp files allow those assets to be transferred between computers or Trainz installs while allowing those installs to have their own unique databases of assets.
 
Well, like I said, happened twice in as many days. Ironically, the first time it occurred I was contributing to a thread where the same thing had happened to someone else. I can see in the DBR log that the route has been 'put aside'. I think it might be related to the two bug reports I logged yesterday which were both about (different) assets that are causing a CTD. That's why I was doing the DBR. I think it may be related to the route having uncommitted edits.

Does saving an asset commit an uncommitted edits?
 
I have options set to do 7 backups a day. So wtf happenened to the 7 backups?
Train will backup once per day and will keep 7 of those daily backups unless specified otherwise in settings. Any backup past the set number of days will be deleted. The safest way to backup is by making a .cdp file when you are finished editing.
 
Funny how most every game on the planet has save game functionality down pat. I save, there's a save file. This is the only game I'm aware of that decides it'll delete a save. Left all my sessions of course. Almost as if it was giving me the finger.

Lesson learned.
Trainz does not "save" in the same manner as most other games. It writes to a database not a save file. I've been using Trainz for over 10 years and have never seen a "save" deleted by the program.
I generally work from DEM data, so my first save is, for example "save as - aa Upper kumbukta west line or build Upper kumbukta west line" or if creating from scratch just "save aaa Upper Kumbukta West". The route would then appear under "Driver/Surveyor' in the Trainz Main Menu. You can also easily check that your route has saved by using "Content Manager" and using the "Today" filter and sorting by "Date Installed" which will place it at or near the top of the list.
When closing Trainz, allow time for the database and backup to be written before shutting down the computer, about five minutes to be safe.
 
In my 21 years of Trainzing, I have never seen a route or session just "disappear". If you mean you can't find it when you look for it in the routes and sessions menu, then it means it's been left open and not available to be loaded. The best way to confirm this is to open up Content Manager and set the author to #self or open up the My Content filter which will do the same thing.

With your content listed, you can then search for your routes and sessions. If the route or session is open for editing, you can submit it in Content Manager.

When content is open for editing, you can access the data via Windows File Explorer. In File Explorer, navigate to where your content is located and open the editing folder. You'll see your route kuid with spaces or sometimes part of the route name plus the kuid. Using Explorer, you can copy those kuid named folders to another location, thus backing them up. Should you want to restore them, you can drag one of these folders into Content Manager.

I perform two kinds of backups. The first is done using Content Manager and cdp files which I name using a route/session-name-version-date format. These are done frequently and more so if I'm going to go through some drastic update.

I also do a full back up of my data and database to an external backup drive. Having a full backup of everything means that should I need to restore the complete database due to a mess up on my part or some hardware catastrophic failure, I'm able to recover quickly relatively speaking. Copying close to 2 TB of data from one drive to another can take a while.

Having this full backup also has another advantage. Should I decide to load Trainz up on my laptop because I'm traveling, I copy the backup to my laptop and I have everything coming with me. When I return home, I export my routes and sessions I worked on to cdp files and import them into my desktop PC copy.
 
Thanks John,

That sounds encouraging. I'm fairly certain it was in an open state when I did the DBR.

I'm away for work, and then play. When I get home I'll have a go at looking for it in CM as you advise.

And I'll make sure I commit changes and save before I move onto something else.
 
In my 21 years of Trainzing, I have never seen a route or session just "disappear". If you mean you can't find it when you look for it in the routes and sessions menu, then it means it's been left open and not available to be loaded. The best way to confirm this is to open up Content Manager and set the author to #self or open up the My Content filter which will do the same thing.

With your content listed, you can then search for your routes and sessions. If the route or session is open for editing, you can submit it in Content Manager.

When content is open for editing, you can access the data via Windows File Explorer. In File Explorer, navigate to where your content is located and open the editing folder. You'll see your route kuid with spaces or sometimes part of the route name plus the kuid. Using Explorer, you can copy those kuid named folders to another location, thus backing them up. Should you want to restore them, you can drag one of these folders into Content Manager.

I perform two kinds of backups. The first is done using Content Manager and cdp files which I name using a route/session-name-version-date format. These are done frequently and more so if I'm going to go through some drastic update.

I also do a full back up of my data and database to an external backup drive. Having a full backup of everything means that should I need to restore the complete database due to a mess up on my part or some hardware catastrophic failure, I'm able to recover quickly relatively speaking. Copying close to 2 TB of data from one drive to another can take a while.

Having this full backup also has another advantage. Should I decide to load Trainz up on my laptop because I'm traveling, I copy the backup to my laptop and I have everything coming with me. When I return home, I export my routes and sessions I worked on to cdp files and import them into my desktop PC copy.
Content Manager did list the route but had it as location unknown so no easy fix there. It did give me the right kuid. There was a folder in the /backup folder with the right kuid but all the timestamps were from the day before I did most of the route changes. I couldn't find that kuid in the editing folder but trawling my build folder more widely I found a .tzarc file with that kuid in /local/hash-F7. I followed the instructions for restoring from a backup on https://online.ts2009.com/mediaWiki/index.php/Help:Restoring_Content and it appears to be all rock and roll from here!

Thanks for your help!
 
Unknown location... I've never seen that unless there is a real unknown location. To me, this sounds like the route and session were corrupted beyond repair. At least you were able to recover your content.

I hate the restore method. I wish there was a simple application that would do this for us.
 
Back
Top