PDA

View Full Version : Reimporting backups: How to import the .tzarc and do they contain useful data?



JCitron
September 22nd, 2015, 09:38 AM
A question has come up before regarding restoring backups. In the past we've been able to restore content by dragging and dropping the folders of the asset we need to restore, back into Content Manager. The folders still work, but the .tzarc files do not.

What are these .tzarc files? They have the same Kuid as the asset-folders we can restore, but they cannot be imported.

Here's an example:

The folder is kuid2 524343 6553 1 Angolan trio Dancers

The .tzarc is kuid 524343 6553.tzarc

Should we just ignore these?


John

WindWalkr
September 22nd, 2015, 06:33 PM
Our only supported backup process has been to take a complete backup. Typically I'd recommend a proper backup utility to do this (eg. Time Machine on the Mac side; I'm not up to speed with Windows equivalents but there are a few free ones out there which seem decent.)

tzarc cannot be used outside of its place in a Trainz installation- CM cannot install content from this format, for example.

In theory you could place everything individually in the correct location and then perform a database rebuild, but this is complex and likely to be error-prone if you haven't taken a full backup.

chris

JCitron
September 22nd, 2015, 09:29 PM
Our only supported backup process has been to take a complete backup. Typically I'd recommend a proper backup utility to do this (eg. Time Machine on the Mac side; I'm not up to speed with Windows equivalents but there are a few free ones out there which seem decent.)

tzarc cannot be used outside of its place in a Trainz installation- CM cannot install content from this format, for example.

In theory you could place everything individually in the correct location and then perform a database rebuild, but this is complex and likely to be error-prone if you haven't taken a full backup.

chris

I think we're talking about two different things here, Chris.

There are similar utilities for backing up in Windows such Acronis' True Image products which allow images as well as dated backups and restores. What I am asking and I'm sorry if I wasn't clear is in relation to the backup-dated folders which are created as assets are modified.

These folders are in DD-MM-YYYY format and contain assets that have the backups of the assets that have been touched. These exist as individual folders under the dated-folders like this: (Thanks to the good old tree command at a command prompt.)


F:\TANE_DATA
├───backups
│ ├───15-09-13
│ │ ├───kuid 110192 29021 Lada Niva yellow
│ │ ├───kuid 110192 29023 Lada Niva green
│ │ ├───kuid 110192 29024 Lada Niva red
│ │ ├───kuid 110192 29026 Lada Niva white
│ │ ├───kuid 110192 29032 Lada 2107 blue
│ │ ├───kuid 110192 29033 Lada 2107 green
│ │ ├───kuid 118606 141213 GAZEL N1
│ │ ├───kuid 118606 141218 GAZEL Ambulance
│ │ ├───kuid 118606 141459 LIAZ 677 N1
│ │ ├───kuid 118606 141471 LIAZ 677 N2
│ │ ├───kuid 118606 141472 LIAZ 677 N3
│ │ ├───kuid 125910 29056 bilico arcese
│ │ ├───kuid 149987 21590 spring-field 01
│ │ ├───kuid 149987 21593 spring-field 04
│ │ ├───kuid 207407 8012 depo aprelevka
│ │ ├───kuid 262705 100015 Iveco Tankzug Obermai
│ │ ├───kuid 262705 100016 auto MB AutoTank

etc.



These happen to be assets I imported or downloaded from the DLS which had errors in them that needed repairs. They were committed of course then opened up for repairing and ended up here in this repository.

There comes a time when we've messed up a fix beyond being able to revert it back to the original. There are also times when a route or session gets deleted during a data clean-up or something gets muffed to a point where it's necessary to restore back a day or two, or perhaps even the same day. In the past, we've deleted our original "badly abused" asset and dragged the kuid-named folder back into CM. This restores the ruined asset back to its original uncorrupted state and we can then proceed from there.

Now in T:ANE this still works. I just tried it to be sure. :) The question came up about the .tzarc files which can't be opened. I thank you for that and I'll pass that info on when asked about it. What are those exactly if they have the same name as some of the folders? I ask this because someone is going to bug me about that - you know how that goes. :D

John

WindWalkr
September 22nd, 2015, 09:34 PM
What I am asking and I'm sorry if I wasn't clear is in relation to the backup-dated folders which are created as assets are modified.
...
There comes a time when we've messed up a fix beyond being able to revert it back to the original.

Shouldn't happen with DLS content, but you're right that this could happen with your own content.



In the past, we've deleted our original "badly abused" asset and dragged the kuid-named folder back into CM. This restores the ruined asset back to its original uncorrupted state and we can then proceed from there.

As long as you're replacing the same asset at the same location in the file system, and following that up with a database repair, I'd expect it to work.




What are those exactly if they have the same name as some of the folders?

The tzarc files? They're single-file archives of the assets. They reduce the number of times we have to touch the file system to query or read a particular asset.

chris

JCitron
September 22nd, 2015, 09:47 PM
Shouldn't happen with DLS content, but you're right that this could happen with your own content.




As long as you're replacing the same asset at the same location in the file system, and following that up with a database repair, I'd expect it to work.





The tzarc files? They're single-file archives of the assets. They reduce the number of times we have to touch the file system to query or read a particular asset.

chris

Thank you for the quick answers. :)

I've never had to do a DB-repair upon reimporting the same assets. I simply delete the old one and import the folder, or drag it back into CM, and the content reappears again. As far as CM thinks, it's a "new" asset all over again. If this is causing a problem, I'll recommend a DB-repair if it's necessary to do that. And yes, these are all third-party or my own content and not built-in stuff.

That makes sense regarding the big archive files. I assume that they work like a big cache of the touched content so as you say the database doesn't have to be fuller refreshed all the time when a query is made.

John

WindWalkr
September 23rd, 2015, 02:17 AM
I've never had to do a DB-repair upon reimporting the same assets. I simply delete the old one and import the folder, or drag it back into CM, and the content reappears again. As far as CM thinks, it's a "new" asset all over again.

If you're installing content through CM then you will not need to force a db repair. It's only when you start modifying files on disk without Trainz knowing that something has changed that you'll need to force a repair; that will tell Trainz to scan all of the files for changes and rebuild any cached data. Without that step, you'll end up with a mismatch of new and old data, which could introduce any number of spurious problems.

chris

JCitron
September 23rd, 2015, 10:51 AM
If you're installing content through CM then you will not need to force a db repair. It's only when you start modifying files on disk without Trainz knowing that something has changed that you'll need to force a repair; that will tell Trainz to scan all of the files for changes and rebuild any cached data. Without that step, you'll end up with a mismatch of new and old data, which could introduce any number of spurious problems.

chris

That makes sense... Spurious problems are something we don't need. :)

John