Restore Alation¶
Customer Managed Applies to customer-managed instances of Alation
Use the steps below to restore Alation from a backup when the Postgres database backups are included into the compressed Alation backup file (default).
Version 2021.4 or Newer¶
In order to restore backups of 2021.4 and newer, you need to use two backup files: the Alation application backup and the Event Bus backup.
Note
See Find Backups for details about the backup storage location.
To restore, follow these steps:
On the new system where you are going to restore, create a temporary directory in /data2, for example, /data2/restore.
Move or copy the Alation and Event Bus backup files to this directory. This ensures that both backup files are accessible from inside the Alation chroot.
Important
Make sure to use two backup files taken by the same backup process. They will have the same timestamp and version, for example:
Alation backup file:
202109232027_10-0-0-147420_alation_backup.tar.gz
Event Bus backup file:
202109232027_10-0-0-147420_alation_eb_backup.tar.gz
The first two parts of the file name, such as
202109232027
and10-0-0-147420
, separated with underscores, document the timestamp of the backup action and the Alation version.Enter the Alation shell:
sudo /etc/init.d/alation shell
Using the alation_conf command, change the
alation.backup.restore_file
parameter value to reflect the path to the backup file, for example:alation_conf alation.backup.restore_file -s /data2/restore/202109232027_10-0-0-147420_alation_backup.tar.gz
Using the alation_conf command, change the
alation.backup.eb_restore_file
parameter value to reflect the path to the Event Bus backup file, for example:alation_conf alation.backup.eb_restore_file -s /data2/restore/202109232027_10-0-0-147420_alation_eb_backup.tar.gz
Change user to
alation
:sudo su alation
Change ownership of the Alation backup file to user
alation
:sudo chown alation:alation <path/to/Alation/backup/file>
Example:
sudo chown alation:alation /data2/restore/202109232027_10-0-0-147420_alation_backup.tar.gz
Change ownership of the Event Bus backup file to user
alation
:sudo chown alation:alation <path/to/Event-Bus/backup/file>
Example:
sudo chown alation:alation /data2/restore/202109232027_10-0-0-147420_alation_eb_backup.tar.gz
Run the restore command to perform the restore. Note that this command overwrites all existing data on the instance if any exists:
alation_action destructive_restore_all
Version 2021.3 or Older¶
Note
The restore process requires a clean system with no existing configuration.
To restore an existing backup,
Copy the backup file to the host where you want to restore. This system should have the same version of the Alation software as the version which generated the backup file.
Check to make sure you are in the right server: you should be on the machine where you are going to restore.
Create a directory accessible from inside the Alation Chroot. For example, create a directory on the backup drive: /data2/restore.
Copy the backup file into the directory you created inside the Chroot.
Enter a Screen session.
screen -S alation-restore
Enter the Alation shell.
sudo /etc/init.d/alation shell
Change the
alation_conf
value to reflect the path to the backup file. For example:alation_conf alation.backup.restore_file -s /data2/restore/backup_file.tar.gz
Substitute user to
alation
:sudo su alation
Change ownership of the restore file to the
alation
user:sudo chown alation:alation /data2/restore/backup_file.tar.gz
Type the following command to run the restore. As the name suggests, this action overwrites all existing data.
alation_action destructive_restore_all
The Alation data will be restored from the backup file.
To check for success:
Log in to Alation and ensure that the data you expect to see from the backup is displayed. For example, download a data dictionary for a data source and check the number of rows.
Note
If users testing the restore encounter Error 500 on some pages in Alation, this may point to the need to reindex some of the internal database tables. See How to Reindex Tables after Backup Restore.