Command Syntax: arcvdbrebuild

Copyright 2008 by Stephen Vermeulen
Last updated: 2008 Oct 12


This is part of a series of articles on backing up computers. The top page is Design for an Archiving Backup System.

This page describes the command line syntax of the program.


The program is used rebuild a lost version database from the redundant data that is stored in the package (.pkg) files.

In most cases if your version database got lost or damaged you should not need to use this program, instead you should look in your version database backup directory for the most recent zip file and extract the database from it. In the case of a serious drive crash where you have lost the version database and its backups then you may need to resort to using this utility.

The program will build a complete version database, which you can then use to guide your file restore process from (and continue doing additional backups to). But it will be missing one piece of information: the time and date that arcvback noticed when files were deleted (which is some time after they actually did get deleted). This is not critical to the functioning of the backup and restore programs, so a rebuilt database is still satisfactory for most purposes.

Since can be used to rebuild just a portion of a database it can also be used if you have some package files left over from a previous backup set and you need to examine their contents for items of interest and perhaps recover some files that were deleted some time ago. This is easily done by having make a new version database (i.e. separate from the one you are currently using for backups) and then having it examine the old package files. Once this database is built you can use, or (by setting up an alternate config.ini file) to examine the contents of these package files and restore items from them.

Since this shares the same version database and package files as the Windows ArcvBack Service does it is best to stop the service before using this.


The arcvdbrebuild program does not get any information from the config.ini file.

The full command syntax is: dbpath archivepath1 [archivepath2 ...] [-h]

where items in the square brackets are optional

The first parameter: dbpath is the directory path where you want arcvdbrebuild to create (or add to) the version database. This must always be supplied. If the directory does not exist it will be created.

The second parameter: archivepath1 is the path to some directory where you have a number of the package (i.e. .pkg) files located from the backup set you are rebuilding the database for. These package files only need to be online while the database is being rebuilt, so its perfectly fine to insert a DVD full of package files into a drive, run the command to update the version database with those package files and then change the DVD to another set of package files and run the command again for as many DVDs as you need to.

If you have multiple directories (perhaps on other drives or network shares) where package files are stored you can list them out on the same command line or you can just run the program multiple times.

If you run the program multiple times with the same package files for input it will not mess up the database.

You can provide the package files to the program in any order, and they can be processed in any number of separate batches without affecting the database.

The -h parameter will bring up a short syntax help prompt.

Caution Note

In some cases if arcvback crashed (the machine crashed or arcvback was running at the time a reboot took place) it is possible to find references to some files that were not completely backed up in the PKG files. These files will not be listed in the database so arcvrestoregui will work correctly and the next time arcvback runs these files will get properly backed up. However, if you were to re-create your database by running the arcvdbrebuild program it will create a database that shows these partially backed up files. When this happens arcvrestoregui will display "INCOMPLETE" at the end of the event/version information for the file, as shown in the following figure:
The INCOMPLETE file status
The reason this can happen is that a single file can be split across multiple packages (in the example figure the file requires three packages because the file is large and I have set the package size low to test). If, while writing the packages for this file, arcvback is interrupted after it has finished the first package, but before it has finished the additional packages, then it will remove the partial packages but it cannot remove the first package as that contains parts of some other files (the version information for these has already been committed to the database). So you end up with a package that contains a bunch of complete files and the first part of one file right at the end.

When this happens arcvback (at least in 4.0 and up) will make sure the backup database does not contain a reference to this fragment, so for the most part it is not an issue. But if you have to rebuild the database from the contents of the PKG files using the arcvdbrebuild utility then versions for these incomplete files will be included. This is because the arcvdbrebuild utility allows you to build the database in many passes, and so must allow you to create incomplete databases from subsets of the package files.

If you try to restore one of these incomplete versions the arcvrestoregui will complain about the file's SHA1 hash not being correct, but it will write the incomplete (and likely damaged) file to disk in case there is something you can salvage from it.

                back to home