QNX2 backup/fbackup/etc questions, editing programs?

(this is a bit of a read but I feel it necessary to explain the situation)

The software we use creates multiple, disparate configuration files in many different locations. I have to maintain backups of these files for ~20 machines, and the only means that the software offers is via tape or floppy, and we don’t use tapes. This is a pretty big undertaking and I am trying to improve/streamline our process because it’s all on me and I know there has to be a better way.

With @maschoen 's recent guidance, I have managed to successfully and confidently navigate drive mounting/formatting/booting and the process of making a full drive copy with the backup command.

This serves as a good first step for recovery, but I am now trying to parse and understand some of the other file backup tools that QNX and this software have.

The software has its own functions that utilize the QNX backup, tbackup, and fbackup utilities… it will prompt the user for the requisite info (ie; category, archive name, size of disk, etc) and then go about its business without the need of further user input… except for media interaction.

The backups we need to make routinely span 10-20 floppies and takes So Long to work through because it automatically formats each disk before writing, and then also verifies each disk afterward. This is great for making a comprehensive backup of necessary configuration components, but it offers no ability to choose a location/directory, nor a hard drive.

If I use the dump |more string, I am able to see the hex data of these programs, and I can see parts of the different [t/f]backup command strings and input arguments in plaintext as I scroll through the data.

I was hoping I could load the program into ed or bed to maybe change which command it uses and still have the prompts for input and automation, but it is only a text editor, and doesn’t seem to “see” or report that same text I saw in the ascii column of the hex dump.

  • IS there even any way for me to edit these programs?
  • Is there any hex editor that might make the ascii text easier to read/parse?
  • Is there a way to sort of “log” what command strings are being executed in the shell? Like maybe seeing what the final output is from the software’s little front-end when it uses the fbackup command? Maybe I could just see how it implements some of these functions so I know what directories, files, filters, arguments, etc it ends up using…

These curated backups are important because they allow for data to be imported into a fresh installation in the event that something corrupts anything on the drive which may unknowingly be preserved during the complete drive backup process. They are also the easiest way to corral all the files rather than trying to fish around and save them all individually.

Even if I can’t edit the program components within the software, if I could interpret what it’s doing, I imagine the same effect could be achieved with a script written around maybe the backup command so I could specify a hard disk destination…

For some context, here are a few text screen-caps that I colored and cropped as images; the function being accessed from the software’s main screen, the program in the file list, a hex dump of me searching the string “backup”, and the same program being loaded from the shell.

from menu

file list

hex

from shell

The spatch command allows you to edit and save files in hex format. It’s looks similar to the dump output above except you have edit / save capabilities.

But I doubt you can change much on the text strings in the program and have it work. You can probably do something like change string text like ‘foo’ to ‘Foo’ but changing the length of the string itself is probably not possible (you can of course experiment).

If you can read the text strings in the program and ‘see’ the commands being issued, you should be able to do the same thing from the command prompt and get the same result (ie backup something using the software and then try doing the same command manually and see if you get the same results).

I’m guessing the company that originally provided you with the machines + software is long gone so that you can’t just get the code from them to find out the exact command formats?

Tim

Yeah my expectations aren’t super high, but I’d rather confirm that it doesn’t work rather than have the lingering doubt. Had no clue about the spatch command, and it was only coincidence that it’s in that screenshot :o

The caveat being that the strings aren’t really complete in that plaintext area, there are placeholder variables all over the place, lots of " >> " and " %s " and " %d " which I assume are all pulling input from prompts it gives to the user and sends a string along into another or something.

Totally surmising here, not a programmer or anything like that x.x I have to imagine other parts of the program point to specific addresses within the file or something whenever it needs specific strings.

Like I said, is there perhaps any way to capture what the shell ultimately finally sees when the program executes a full command/string?
Would it even be processed through the shell?

I’m just thinking about it like the program obviously uses commands that are in the cmds folder, it must suppress most (if not all) of the stuff you’d normally see if running a command manually, but all that input and output has to be in a buffer somewhere, shouldn’t it?

Bingo.
Apparently the original dev was Imagination Systems Inc. in virginia beach, then they were bought or merged with this NemaSoft group of Nematron out in Michigan. The story I hear from a couple of the remaining long-time people here at our facility is that a lot of the original ISI people weren’t interested in moving from Virginia Beach to Michigan (understandably so), so they lost some of their crew… the software was developed for a while longer and then eventually bought by some OTHER automation software company. They claimed they were going to continue supporting it but in reality just wanted the customer pool so they could turn around and sell their own product.

No idea if that’s wholly accurate or not, maybe it was Nematron themselves who eventually phased out the software in favor of their own products. There’s some mention on a Chinese website about the acquisition of ISI; http://www.nematron.cn/en/about/2.html (coincidentally with a photo of their old Michigan building at the top of the page)

At the end of the day, I think our facility should have bought the rights to the software and continued developing it further… we could have catered it even more to our needs, brought it forward onto newer and more capable computer tech, heck we could have even licensed it out to other players in the industry and made money on it… instead we’re stuck contracting out for every time we need a system built.

The >> is normally a redirect to a file. As in it takes some input and redirects the output to a file. Could very likely be the software is building a list of file names and redirecting it to a file to build a list of filenames or something like that.

The %s means string in the C language. Its probably being used to build a longer string that includes the file paths. So for example you’d do something like ‘C:\backup%s’. Then later that %s would get filled it with what the directory the user selected to backup under backup.

The %d means an integer number in the C language. It’s used in the same manner as %s above.

There is no way for you to capture the shell output unless their backup program is writing to a file (the >> suggests it may very well be). You might be able to find the temporary files it writes to if you look around on the disk (it likely erases them so you’d need to look while a backup is in progress).

Did you ever think to try and contact former employees of that company to see if any of them have the understanding you are looking for (or even possibly a copy of the code). A quick LinkedIn search found this guy (Jeffery Mock) who worked on it.
https://www.linkedin.com/in/jeffrey-mock-50177912?challengeId=AQEvLx_JlO9EEwAAAZKgU-ZLKxywPQquNCslD7B95S8BXIYDO1vxloHFzi428zNqIFc6b6YcsCxaAkypH0La77zyMU_Jxyb88w&submissionId=88b090ff-e796-ff17-5545-2c22216e6e35&challengeSource=AgFza4cEAnQGlAAAAZKgVGTKfeBSKfUedoLKvSRmIBHqopCj9ssHx2UB6hQc-GM&challegeType=AgGM7xlN_-ZkpgAAAZKgVGTO4h4nt39KVw81MfGB5IvYgBFRCEj4NMQ&memberId=AgHRQuIbBGSjrgAAAZKgVGTSzCfVHNSjMR-0xWXi9a2Bugc&recognizeDevice=AgEbwDdQTHz-uQAAAZKgVGTWT3HYynLMeBx-VUBfbfWgkatp2ASg&original_referer=https%3A%2F%2Fwww.linkedin.com%2Fcheckpoint%2FchallengesV2%2FAQEvLx_JlO9EEwAAAZKgU-ZLKxywPQquNCslD7B95S8BXIYDO1vxloHFzi428zNqIFc6b6YcsCxaAkypH0La77zyMU_Jxyb88w%3Foriginal_referer%3Dhttps%253A%252F%252Fwww.google.com%252F

Tim

ah jeeze, so it’s probably not possible :confused:

I do see it referencing 3:/tmp/backup.files a few times…

is there any way to run another command or script that can constantly monitor the /tmp/ directory during a backup procedure and grab a copy of any files that get generated?
Or is there something I should be looking for in this program that signals to purge anything in the tmp directory?

oh, is the /tmp/ directory a QNX thing by default; like does the OS regularly purge stuff out of there?
I wonder if I could make it point anywhere else and maybe it won’t get purged…

I realized it looks like it has all the locations that it searches in with the files command and appropriate p= filters and -v and then the >> after each. I’m assuming that means it is appending the output of each one of those strings into the temp file…

It keeps repeating the same kinds of inputs and writing to that same “file”

files %s3:/dir/place -v %s >> %s.+m..
files %s3:/dir/location p=* -v %s >> %s.+m..
files %s3:/dir p=*xyz -v %s.+m..

etc etc… I suppose I could just sieve all of that and document where it’s looking and what for, and kinda build on that. How would I determine what the %s is supposed to be under a given circumstance? It’s used in so many different places, I assume it doesn’t actually represent anything specific but rather just informs the program that “here will be a string input” or something maybe?

And yeah I’ve considered trying to track down some of the old staff, I have a list of a few names in a notebook somewhere here at my bench… that person you linked seems to have worked on the GPIB driver components of the software so I don’t know how familiar they might be, but might know someone else I should be looking for.

I see that fbackup has a +Force option to “allow use of non-floppy disks” and the QNX manual claims that allows archiving to a hard disk, but I don’t think there’s any way to dupe this container/front-end program into adding that option.

One of the other problems is that the main software also has a restore function to take everything from an archive and put it all back where it belongs, especially without disrupting the database or anything else… it works perfectly as intended with a floppy backup but I don’t know if I’d be able to also make that point to an archive on a hard disk…

  • also, how exactly does fbackup structure data on a floppy? If I try to read/browse a disk with an archive on it, QNX just says “Unable to open,” but the fbackup program can list/access it just fine.

Forgive me for not reading all of this right now. I’ll come back to it tomorrow. In the mean time, there is one possibility that might work for you, a bit of legacy hardware called an Iomega Zip drive or Jaz drive. These drives used 100MB and 250MB floppy disks. These were accessable via a parallel port or EIDE interface. The parallel port version requires a non-qnx driver, but I’m the developer of that driver. I’m not sure if it will work with a Jaz drive.

I also happen to have a few drives I’ve been holding onto for too long. I’ve been thinking of trying to unload them on eBay, but if you have an interest in this solution, let me know at maschoen@pobox.com.

There’s also still at least one person who can still program QNX 2 programs, me. A custom backup program would probably not be difficult.

A few more things to add. The only think that I know of that the OS uses /tmp for is when you do a pipe. QNX 2 doesn’t have real pipes but the schell will redirect the output to a /tmp file and then the next program in line weill read from it. Oh, the QNX ‘c’ compiler also did something liek this. It was very common to mount a ramdisk and put it first in line in the search order so /tmp files would be much faster on the ram disk.

fbackup puts files in a custom archive format on floppy diskettes. It can create a multiple disk backup. One use for the +F option was so that program could backup to removable media like the Iomega Zip drive. As a protection against stomping on your hard drive, the program would not write to anything other than a floppy disk by default.

It’s all in the ‘Technical Notes’ documentation (do you have that one?). It seems like they are using the built in backup/fbackup commands that are described in there. That’s probably a proprietary archive format that QNX created (or maybe was a popular archive format back in 1990 time frame) that seems to write one file after another consecutively spanning multiple disks.

I think QNX2 used ‘zoo’ file format to do the actual compression. If you have something that can read zoo archives it might be able to read the floppy.

Tim

Tim, I’m quite sure that zoo will not read a qnx fbackup disk. The only obvious way to read it is with the fbackup program. I looked at the technical note and it doesn’t by itself provide enough information to read an fbackup floppy, but I think it could be reverse engineered. I don’t believe that the files were compressed at all. One could of course use zoo to create a .zoo file and use fbackup to putt in on multiple floppies.

Once I’m at a point with this stuff where I know exactly what files this software actively needs and selects for backup, and how it is able to manage re-importing without corrupting its own database, I may very well proprose the idea to my director.
For now, at least I’m able to make a full backup without much fuss; it’s more of a priority to just make sure we have a batch of all the systems archived in their current state… But i’d definitely like to have granular backups of configurations that we might be able to pick and choose stuff to archive/restore.

as much as I’d like more options for maintaining these machines, I don’t know that it would offer much beyond what I can already do with a second hard drive or additional partitions. The archive/export program in this software is locked to floppies since it was written to use fbackup and has no means to incorporate the +Force option, and if I could, then I’d just point it to a hard disk.

I have my own personal apprehensions with zip disks and drives anyway; I used them a lot back in the day when I primarily used Macs and they were great when they worked, but I’ve had so many fail in short order… if it wasn’t the disk, it would be the drive itself. They don’t inspire enough confidence; I know any media can fail but I don’t think it’s a variable we’d want to fold into the process I’m trying to create.

On the other hand, I’d be curious if you think you’d be able to update the ATA disk driver to read/format more than the ~8gb partition limit I’ve hit :thinking: That isn’t necessarily a high priority either, but it could potentially be useful to have larger volumes in some of our rigs that log a lot of data.


Thank you both for some clarification about the fbackup utility, though. It saves me some time and energy by not pursuing it too much as a prospective option for some things.
I also now know to use that to check a disk before blindly formatting it… I unintentionally formatted a couple dozen disks from my previous coworker which actually had some old archives on them. Fortunately nothing imperative, I think, but it was a scary realization when I figured out that they weren’t actually blank.

Also @Tim yes, I’ve got the Technical Notes portion of the manual, I’ve printed and bound all the primary documentation so I’ve got it at quick reference… much better than trying to constantly skim PDF files.

On the other hand, I’d be curious if you think you’d be able to update the ATA disk driver to read/format more than the ~8gb partition limit

It’s possible. It would be expensive for a number of reasons. I would have to resurrect old hardware and old knowledge. There may be so QNX 2 limitation issues, although it would seem that the file system would support it.

If fdisk would allow for more than four partitions, I could just make multiple 8gb partitions across whatever size disk I’ve got. That’s less ideal, I suppose, but kind of a good way to compartmentalize different backup options if I can codify a procedure…

like the main one as boot/working, one can be separate periodic backups of the entire boot drive minus logged data, one can be just logged data, and I can use the forth for who knows what… if I mount it as drive 2, there are SOME parts of the software we use that offer “Floppy 2” as a source/destination but do not use floppy-exclusive commands, so the software will blindly access it.

Don’t hold me to the prospect of a modified ATA driver, it may not ultimately prove necessary, but it’s fun to think about. I always liked squeezing more out of old machines than they were ever intended or expected to do.

If fdisk would allow for more than four partitions, I could just make multiple 8gb partitions across whatever size disk I’ve got. That’s less ideal, I suppose, but kind of a good way to compartmentalize different backup options if I can codify a procedure.

It’s understandable why you would think this. It’s all wrong. The partition table has a fixed size on the first sector, and the rest is used for booting code. On the other hand, you can have more than 4 partitions. The partition table is a convenient place to indicate the configuration for the partitions and it’s needed for the BIOS to boot of the HD, but that’s it. Using the o= and s= options of mount, you can mount from anywhere, regardless of what the partition table shows. This is an issue with the number. I’m not sure if you can overwrite disk 1, the floppy disk nor is it clear you would want to. The same for disk 2. You probably can. I think that QNX2 only supports 8 disks which might mean 6 other partitions. If you also need a ram disk, that’s one less. So somewhere between 8 and 5 partitions are possible.

I don’t know of any floppy exclusive commands, although fdformat willl not work. Dinit and fbackup require parameters to work.

If you have any real interest in the ATA driver changes, time may be of the essence. In the next few months I will be purging the old legacy hardware I would need to do this and I don’t think it will be replacable.