Draft: Import tool to import group tree with projects
master
. This is a script to assist with resolving a data restore that the SRE team will copy directly into a console session.
What does this MR do?
Imports all groups and projects to a namespace from a bundle generated using the script in !40731 (closed).
Address the import portion of this issue #241705 (closed). This has been created to assist the SRE team with restoring some data as part of this request: #241379 (closed)
To make the import process simpler it's parsing the export files to define the root group path, also the path is used as the group name.
All the process is being done in a serial form for now. It's not the most efficient way to do it, but it's the simplest.
- Related issue: #241705 (closed)
- Export MR: !40731 (closed)
File Structure
Exported file
The unpacked structure of the file generated in the export script looks like this:
$ tree bundle
bundle
├── 2020-09-06_09-49-512_g1_export.tar.gz
└── projects
├── g1.1
│ ├── g1.1.1
│ │ ├── p1.tar.gz
│ │ ├── p2.tar.gz
│ │ └── p3.tar.gz
│ ├── g1.1.2
│ │ ├── p1.tar.gz
│ │ ├── p2.tar.gz
│ │ └── p3.tar.gz
│ ├── p1.tar.gz
│ ├── p2.tar.gz
│ └── p3.tar.gz
├── g1.2
│ ├── g1.2.1
│ │ ├── p1.tar.gz
│ │ ├── p2.tar.gz
│ │ └── p3.tar.gz
│ ├── g1.2.2
│ │ ├── p1.tar.gz
│ │ ├── p2.tar.gz
│ │ └── p3.tar.gz
│ ├── p1.tar.gz
│ ├── p2.tar.gz
│ └── p3.tar.gz
├── neoterm.tar.gz
├── p1.tar.gz
├── p2.tar.gz
└── p3.tar.gz
Does this MR meet the acceptance criteria?
Conformity
-
Changelog entry -
Documentation (if required) -
Code review guidelines -
Merge request performance guidelines -
Style guides -
Database guides -
Separation of EE specific content
Availability and Testing
-
Review and add/update tests for this feature/bug. Consider all test levels. See the Test Planning Process. -
Tested in all supported browsers -
Informed Infrastructure department of a default or new setting change, if applicable per definition of done