Upgrading from AllegroGraph v4.x to AllegroGraph v4.y and later (y>x, y>=4)
Warning: these instructions only work for AllegroGraph v4.0.4 and later. If you need to upgrade from a version earlier than v4.0.4, please contact Franz Inc. Customer Support (support@franz.com).
The agraph-backup utility has been enhanced, as we describe below, to make upgrading from one AllegroGraph version to a later version much simpler. (To upgrade from version v3.x, see Convert from v3 to v4.)
For v4.4.0.1 (and 4.4), a corrected agraph-backup program was made available after the initial release. Please be sure you have that update, which is available for download from http://franz.com/ftp/pri/acl/ag/ag4401/linuxamd64.64/SE/agraph-4.4.0.1-backup-20120112.tar.gz . The user interface has changed, and it is the new (updated) interface we document.
The issue with upgrading
Two things need to be moved from the earlier version to the later: the data and the server settings. The data is the set of triples. The server settings are (more or less) everything else: user information, security settings, etc. (But note, as we say below, the config file is not moved.)
Do backups before migrating
Using agraph-backup of the older version X (X < v4.4), backup each repository separately (see Backup and Restore for agraph-backup usage). This step ensures you can still use the database in version X even if the upgrade to version Y fails.
New config (.cfg) file
You must set up the configuration file (including license keys) in the new version before doing restore-all for the new version.
This cannot be done automatically, for the new config file doesn't need to have the same port and/or directories as the old config file. Except for the config file, everything is migrated from one version to the later version.
Migrating repositories created by AllegroGraph 4.3.3 and before
You need to use the new agraph-backup command with the matching version of the AllegroStore you're going to migrate to. You also need to know the path to the agraph-backup command of the previous version (the version you're migrating from).
Suppose the latest agraph-backup command is in agraph-4.4/bin/agraph-backup, and the previous version's agraph-backup command is in agraph-4.3.3/bin/agraph-backup. You have the previous version of the config file at /path/to/previous/config. The previous version of AllegroGraph server needs to be running. You are archiving the repository under /path/to/archive/dir.
Issue the following command, and everything will be archived under /path/to/archive/dir.
$ agraph-4.4/bin/agraph-backup --ext-backup-command agraph-4.3.3/bin/agraph-backup backup-settings /path/to/archive/dir /path/to/previous/confg When this command succeeds, you will have an entire repository archive under /path/to/archive/dir. Stop the previous version of AllegroGraph server, and start the latest version of AllegroGraph server (you must have set up a new config file, as mentioned above). Then issue the following command:
$ agraph-4.4/bin/agraph-backup --port port restore-all /path/to/archive/dir (--port port is only necessary if you're running the latest version of AllegroGraph server at non-default port). This overwrites some global repository settings, so you need to restart the AllegroGraph server after the restore has completed.
Migrating repositories created by AllegroGraph 4.4 or later:
Suppose you're migrating from 4.4 to (upcoming) 4.5.
Run AllegroGraph 4.4 server, and use version 4.4's agraph-backup (assuming it's in agraph-4.4/bin/agraph-backup) to create the entire repository archive under /path/to/archive/dir.
$ agraph-4.4/bin/agraph-backup --port port backup-all /path/to/archive/dir Stop AllegroGraph 4.4 server after the restore has completed, and start the 4.5 server (you must have set up a config file, as mentioned above). Then run 4.5's agraph-backup (assuming it's in agraph-4.5/bin/agraph-backup) as follows:
$ agraph-4.5/bin/agraph-backup --port port restore-all /path/to/archive/dir This overwrites some global repository settings, so you need to restart the AllegroGraph server after the restore has completed.
Automatic upgrade of databases
When an archive created by older version of agraph-backup is restored, either by restore or restore-all, the database is converted to the current version by default.
To suppress this operation, give --noconvert option to agraph-backup.