From 7d78969ee5df6419d94fa5ef919672aa7a54f17f Mon Sep 17 00:00:00 2001 From: Brus Date: Mon, 17 Jul 2023 08:19:47 +0000 Subject: [PATCH] Delete page 'DisasterManagement' --- DisasterManagement.md | 219 ------------------------------------------ 1 file changed, 219 deletions(-) delete mode 100644 DisasterManagement.md diff --git a/DisasterManagement.md b/DisasterManagement.md deleted file mode 100644 index ae7d586..0000000 --- a/DisasterManagement.md +++ /dev/null @@ -1,219 +0,0 @@ -

- File Restore with the command line tool -

-"IBM Spectrum Protect" is a data protection and recovery software solution that helps to manage backup and recovery operations. - -For TETHYS up to **90 incremental versions** of each data file will be backed up and are available for recovery. This means that there are 90 instances of the data that have been backed up at different points in time. These versions are typically created based on the backup schedule and retention policies defined by the computer center of the „GeoSphere Austria“. - -## Recovery Tool - -Command line restore examples for the versio 8.1.17 can be found here:\ - https://www.ibm.com/docs/en/spectrum-protect/8.1.17?topic=data-command-line-restore-examples - -How TO: - -- change into the direcotiry of the IBM backup archive client: - ```bash - cd /opt/tivoli/tsm/client/ba/bin - ``` -- start the backup client wit admin rights: - ```bash - sudo dsmc - ``` -- general help - ```bash - Protect> help restore - ``` - -## Examples - -### **1. Fixity check fails for one file:** - -**Restoring a single file from a selection of existing versions** - -```bash -Protect> restore /etc/host -pick -inactive /tmp/restored/ -``` - - - - - - - - - - - - - - -
Means:
- Restoring the file /etc/hosts to a new target directory "/tmp/restored/" with manual selection (-pick) of the desired versions. The specification of "-inactive" is necessary to get also already deleted or changed versions of the file displayed. -
- Subsequently, the following result is to be output. The column A/I means: -
- A = last valid version (active) -
- I = Inactive versions that are no longer on the productive disk -
- You select the required version by entering the selection number at the front. - In the example, the older of two versions (2) is to be restored. -
-
- - - - - - -
Protect>   restore  /etc/host  -pick  -inactive  /tmp/restored/
- Restore function invoked.
- TSM Scrollable PICK Window - Restore
-
- #    Backup Date/Time        File Size A/I  File
- ----------------------------------------------------------------------------------------
- 1. | 12/05/2023   13:18:21       1.69 KB  A   /etc/hosts
- 2. | 11/21/2023   10:16:19        726  B    I   /etc/hosts
-     |
-     0---------10--------20--------30--------40--------50--------60--------70--------80------
- <U>=Up  <D>=Down  <T>=Top  <B>=Bottom  <R#>=Right  <L#>=Left
- <G#>=Goto Line #  <#>=Toggle Entry  <+>=Select All  <->=Deselect All
- <#:#+>=Select A Range <#:#->=Deselect A Range  <O>=Ok  <C>=Cancel
-
- pick>   2
-
- -### **2. Fixity check fails for whole dataset (all files in dataset folder):** - -**Restore a directory with the backup state of a certain date to a new target directory** - -```bash -Protect> restore /storage/app/public/files/268/ -sub=yes -inactive -pitd=10/20/21 /tmp/268/ -``` - -Restore the complete directory "storage/app/public/files/268/" including all subdirectories (parameter -sub=yes) as it was at the time "October 20, 2021" to the directory "/tmp/268" (must be created before). If no new folder is defined, the folder "/storage/app/public/files/268/" will be overwritten. There is no prompt, the restore starts immediately. - -### **3. Restore a file in different/all versions to different result files** - -First, it is **queried which versions** exist: - -```bash -Protect> q backup -inactive -subdir=yes /home/testuser/xxxx.txt -``` - -Response: - - - - - - - - - - - - - - - - - - - - - - - - - - - -
SizeBackup DateMgmt Class A/I File
447 B10/20/2021 11:04:15DEFAULTA /home/testuser/xxxx.txt
270 B10/16/2021 11:18:37DEFAULT I /home/testuser/xxxx.txt
418 B10/17/2021 11:16:20DEFAULT I /home/testuser/xxxx.txt
- -There are 3 versions of the file "xxxx.txt", their backup date and time is displayed in each case. Thus you are able to restore the respective versions individually, if necessary also under other name. e.g.: - -```bash -Protect> restore -inactive -subdir=yes -pitd=10/17/2021 /home/testuser/xxxx.txt /restore_folder_/xxxx_vom17oct2014.txt - -Protect> restore -inactive -subdir=yes -pitd=10/16/2021 /home/testuser/xxxx.txt /restore_folder_/xxxx_vom16oct2014.txt -``` - - - - - -

Database Backup

- -One of the common backup and restore configurations is an environment with two SQL Servers (SQLServer-1 and SQLServer-2), two SQL Server instances (SQLInstance-1 and SQLInstance-2), and one database named SQLDB-1 which will be backed up, transferred, and restored to SQLServer-2. -![Image](./db_backup.drawio.svg) -
-
-## Create DB backup - -To create a backup of a research database using pg_dump, you can follow these steps: - -1. Open a terminal or command prompt and navigate to the directory where you want to store the backup file. -2. Type the following command to create a backup of the database: - - ```bash - pg_dump -U -E UTF8 -F c -b -v -f .backup - ``` - - Here, replace **username** with the username of the database, **backup_file_name** with the name you want to give to the backup file, and **database_name** with the name of the research database you want to backup. - - -E is for the encoding, e.g. UTF8 - -F c specifies the format of the backup as a custom format, which is more flexible than plain SQL text format. \ - -b includes the backup of the objects such as functions and procedures. \ - -v enables verbose mode which will display the progress of the backup process. \ - - Usually the timestamp is integrated into the backup_file_name: - - ```bash - pg_dump -U -F c -b -v -f _$(date +"%Y%m%d_%H%M%S").backup - e.g.: - pg_dump -U tethys_user -E UTF8 -F c -b -v -f /home/user/backups/tethys_$(date +"%Y%m%d").backup tethys - ``` - -3. When you run the command, you will be prompted to enter the password for the database user. Enter the password and press enter. -4. The pg_dump command will start creating the backup file. Wait until it completes, which may take several minutes depending on the size of the database. - -5. Once the backup is complete, you will see a message indicating that the backup has been created successfully. - -It's important to note that the backup file may contain sensitive information, so it should be stored securely and only accessible to authorized personnel. -
-
-## Restore DB on second DB-Server - -To restore a backup of the research database using pg_restore, you can follow these steps: - -1. Open a terminal or command prompt and navigate to the directory where the backup file is located. -2. Type the following command to restore the backup to the database: - ```bash - pg_restore -U -d - ``` - Here, replace with the username of the database, with the name of the research database you want to restore the backup to, and with the name of the backup file. -3. When you run the command, you will be prompted to enter the password for the database user. Enter the password and press enter. -4. The pg_restore command will start restoring the backup file to the database. Wait until it completes, which may take several minutes depending on the size of the database. - -e.g. -``` -pg_restore -h localhost -p 5432 -U tethys_user -d tethys_db -v /tmp/tethys_20230404.backup -``` -Once the restore process is complete, the research database should be fully recovered with all its data and objects. - -
-
-

Restore API and Web Frontend from Docker Images

-All Tethys Docker Images are stored securely in our Gitea instance by using the built-in Docker Registry functionality. -... \ No newline at end of file