Backup and Restore of a Conversion Project

This chapter is describes how to backup and restore a conversion project. This allows recovery in the event of a disk crash or system failure.

More commonly, this backup and restore process will be used to make a copy of a conversion project to a new location on the same system or on a different system. This duplication of a working conversion project is useful for many reasons, including:

  • To provide multiple testing and development environments, possibly with different code levels in FWD and/or the 4GL source code.
  • To allow multiple developers each to have an independent development environment. This enables parallel work on a conversion project without interfering with each other's work.
  • A single developer can keep one copy of a fully converted project as a snapshot, then convert in another copy after some FWD code changes have been applied, the results can be compared to examine how the code changes affect the converted Java application code.

This chapter documents those parts of the working project that must be backed up/restored. It provides a basic process for backing up those changes and for applying those changes to a new file system location. The process is the same regardless of whether the location is on the same system or a different system.

This chapter will assume that the open source unzip and zip tools are used to backup and restore (respectively) the files.

Backup the Conversion Project

The easiest way to backup a conversion project is to store all the non-generated files associated with it into one of two possible archives.

4GL Source Archive

The 4GL application source code and schema files are stored in one archive. It is useful to place these files into the proper directory structure at the time the archive is created. That eliminates complexity in the restore process.

For the following commands, it will be assumed that the top level directory of the conversion project being backed up is ~/projects/my_app and that the target archive filename is ~/

Schema Files

There must be an exported .df schema file for each database (which has unique data definitions) that is accessed by the application. By convention, these files are found in the data/ directory of the conversion project. This can be customized per project using the global configuration file (see the Project Setup chapter). The example command here assumes that the data/ directory is used.

cd ~/projects/my_app
zip ~/ data/*.df

4GL Source Code Files

All Progress 4GL procedure files, 4GL include files and WebSpeed HTML files which are in use or are referenced must be added to the archive. As noted in the Project Setup chapter, the convention is to place 4GL code in a src/{application_name}/ directory. The 4GL source code is maintained in its original directory structure, but is just placed in this path to separate it from the generated Java code that will be emitted into src/{java_package_pathing}/ when the conversion runs.

As an example, a portion of an application named my_app might have the following relative structure:


Given that structure, the following would be expected in the FWD project:


As with most conventions in FWD, it is possible to customize these paths in the global configuration file (see the Project Setup chapter). The example commands here assume that the standard paths is used.

cd ~/projects/my_app
zip -r ~/ src/my_app/ -i "*.p" -i "*.w" -i "*.i" 

Add -i "*.<extension>" for each file extension used for the application. The example above uses -i "*.p" to include all .p files. This adds files with that filename extension to the archive from any location under the src/my_app/ directory.

The important point here is to include ALL 4GL source code for the application while excluding all the files that are generated as part of the FWD conversion process. Those conversion artifacts do not need to be backed up and should not be backed up, since it can take gigabytes of space for even a medium sized project. Since those files will be recreated dynamically in the restored project, they must be left out of the archive.

Project Configuration Archive

The FWD conversion project has many files that only exist to configure the FWD conversion tools. These did not exist as part of the original 4GL application and are naturally stored in a separate archive. For the following commands, it will be assumed that the top level directory of the conversion project being backed up is ~/projects/my_app and that the target archive filename is ~/

The following should be included in this archive, if they exist:

Standard Path Specification Description
build.xml ANT build configuration.
cfg/* Core FWD configuration including the global parameter configuration among other things.
data/namespace/ Schema output directory which must exist for the conversion tools to run.
data/namespace/*.hints Schema hints files.
pattern/* Application-specific (custom) conversion rules.
src/my_app/*.hints Code hints files.

Many projects will have custom scripts for running conversion, running builds and for running both the FWD server and FWD client. Likewise, most projects will have FWD runtime configuration files such as test server directory files, bootstrap configuration files, key stores and trust stores. All of these files must be identified and included in the archive. In the example below, the *.sh and run/ entries are meant to represent these files.

The paths used in these examples are the standard locations for key FWD configuration files, build files and scripts. It is possible to customize some of these paths in the global configuration file (see the Project Setup chapter).

zip -r *.sh build.xml cfg/ data/namespace/*.hints pattern/ run/
zip data/namespace/
zip -r src/my_app/ -i "*.hints" 

Restore the Conversion Project

The following commands restore the example my_app conversion project backed up above.

unzip -d ~/projects/my_app_conversion_project_dir
unzip -d ~/projects/my_app_conversion_project_dir

Once the archives are extracted, the restored conversion project would be found in the ~/projects/my_app_conversion_project_dir/ directory. From there, the normal conversion and build commands would be executed to use the FWD tools and create a fresh Java version of the converted my_app application.

© 2004-2017 Golden Code Development Corporation. ALL RIGHTS RESERVED.