Helper Scripts » History » Version 4
Enis Nuredini, 23.08.2023 10:47
1 | 1 | Enis Nuredini | h1. Helper Scripts |
---|---|---|---|
2 | |||
3 | 4 | Enis Nuredini | *tear_down_project.py* (Backup project folder and both DBs) |
4 | 1 | Enis Nuredini | Functionality: Creating backup file from project folder and databases (data and typo3). Transfering files to /scratch/tmp/365/. Comprimising all files in one tar. Deleting all created files during this process (except the summary tar file). |
5 | 2 | Enis Nuredini | |
6 | 1 | Enis Nuredini | Requirement: User should have ssh keys for the affected server hosts. |
7 | 2 | Enis Nuredini | |
8 | 1 | Enis Nuredini | Configuration: In the top of the script the project and database host can be written. Path to the ssh keys is set as default. |
9 | 3 | Enis Nuredini | |
10 | 4 | Enis Nuredini | *table_groupmember_reference_transfer* (Transfer specific records from DB1 to DB2) |
11 | 3 | Enis Nuredini | Functionality: User given argument will be searched in configured column (default: reference) from table (default: GroupMember). All found records are transfered from source DB to target DB. If record with given argument exists on target DB then UPDATE statement is executed, otherwise INSERT statement. |
12 | |||
13 | Requirement: Table structure from source and target DB must be identical. Date and datetime defaults, if nothing given in source record needs to be NULL, otherwise mysql outputs an error. |
||
14 | |||
15 | Configuration: DB-users, hostnames and affected table or column can be set inside the script. |