Helper Scripts » History » Version 6
Enis Nuredini, 23.08.2023 10:48
1 | 1 | Enis Nuredini | h1. Helper Scripts |
---|---|---|---|
2 | |||
3 | 5 | Enis Nuredini | h2. Backup project folder and both DBs |
4 | |||
5 | *tear_down_project.py* |
||
6 | 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). |
7 | 2 | Enis Nuredini | |
8 | 1 | Enis Nuredini | Requirement: User should have ssh keys for the affected server hosts. |
9 | |||
10 | Configuration: In the top of the script the project and database host can be written. Path to the ssh keys is set as default. |
||
11 | |||
12 | 5 | Enis Nuredini | h2. Transfer specific records from DB1 to DB2 |
13 | |||
14 | 6 | Enis Nuredini | *table_groupmember_reference_transfer.py* |
15 | 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. |
16 | |||
17 | 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. |
||
18 | |||
19 | Configuration: DB-users, hostnames and affected table or column can be set inside the script. |