Add group wikis to Gitlab Backup
What does this MR do?
In this MR, we add group wikis to the Gitlab Backup. Group wikis are a premium feature and all the code is implemented in the ee folders.
Since there are no free group repository features, the group retrieval and iteration is done as well in the ee part.
How to test the MR
For testing, we will need two development instances, the source and the destination. IMPORTANT: when we restore the backup, all the tables in the destination instance will be deleted.
Create backup
First, create one or several group wikis, then:
bundle exec rake gitlab:backup:create
This command will generate the backup in the <gdk_path>/gitlab/tmp/backups
.
Notice that, for those groups that don't have a wiki, we should see that the backup skips the import of the repository. Like in :
* gitlab-org.wiki (@groups/78/5f/785f3ec7eb32f30b90cd0fcf3657d388b5ff4297f2f9716ff66e9b69c05ddd09.wiki) ...
* gitlab-org.wiki (@groups/78/5f/785f3ec7eb32f30b90cd0fcf3657d388b5ff4297f2f9716ff66e9b69c05ddd09.wiki) ... [SKIPPED]
* gnuwget.wiki (@groups/53/5f/535fa30d7e25dd8a49f1536779734ec8286108d115da5045d77f3b4185d8f790.wiki) ...
* gnuwget.wiki (@groups/53/5f/535fa30d7e25dd8a49f1536779734ec8286108d115da5045d77f3b4185d8f790.wiki) ... [SKIPPED]
* Commit451.wiki (@groups/c2/35/c2356069e9d1e79ca924378153cfbbfb4d4416b1f99d41a2940bfdb66c5319db.wiki) ...
* Commit451.wiki (@groups/c2/35/c2356069e9d1e79ca924378153cfbbfb4d4416b1f99d41a2940bfdb66c5319db.wiki) ... [SKIPPED]
* jashkenas.wiki (@groups/b7/a5/b7a56873cd771f2c446d369b649430b65a756ba278ff97ec81bb6f55b2e73569.wiki) ...
* jashkenas.wiki (@groups/b7/a5/b7a56873cd771f2c446d369b649430b65a756ba278ff97ec81bb6f55b2e73569.wiki) ... [SKIPPED]
* flightjs.wiki (@groups/5f/9c/5f9c4ab08cac7457e9111a30e4664920607ea2c115a1433d7be98e97e64244ca.wiki) ...
* flightjs.wiki (@groups/5f/9c/5f9c4ab08cac7457e9111a30e4664920607ea2c115a1433d7be98e97e64244ca.wiki) ... [SKIPPED]
Restore backup
First, we have to move the created file in the export to the destination instance.
mv <source_gdk>/gitlab/tmp/backups/backup_file_with_a_lot_of_numbers.tar <destination_gdk>/gitlab/tmp/backups/
Notice that you might need to create the directory tmp/backups
in your destination instance.
WARNING: The following command will delete all the tables in the instance.
You have to checkout the branch of this MR and then execute (there is no need to specify the dir):
bundle exec rake gitlab:backup:restore BACKUP=backup_file_with_a_lot_of_numbers.tar
In the log, check that the groups with wikis should say DONE
:
* twitter.wiki (@groups/67/06/670671cd97404156226e507973f2ab8330d3022ca96e0c93bdbdb320c41adcaf.wiki) ...
* twitter.wiki (@groups/67/06/670671cd97404156226e507973f2ab8330d3022ca96e0c93bdbdb320c41adcaf.wiki) ... [DONE]
* h5bp.wiki (@groups/59/e1/59e19706d51d39f66711c2653cd7eb1291c94d9b55eb14bda74ce4dc636d015a.wiki) ...
* h5bp.wiki (@groups/59/e1/59e19706d51d39f66711c2653cd7eb1291c94d9b55eb14bda74ce4dc636d015a.wiki) ... [DONE]
* gitlab-instance-384b40ac.wiki (@groups/41/cf/41cfc0d1f2d127b04555b7246d84019b4d27710a3f3aff6e7764375b1e06e05d.wiki) ...
* gitlab-instance-384b40ac.wiki (@groups/41/cf/41cfc0d1f2d127b04555b7246d84019b4d27710a3f3aff6e7764375b1e06e05d.wiki) ... [DONE]
* aaaaa.wiki (@groups/33/46/3346f2bbf6c34bd2dbe28bd1bb657d0e9c37392a1d5ec9929e6a5df4763ddc2d.wiki) ...
* aaaaa.wiki (@groups/33/46/3346f2bbf6c34bd2dbe28bd1bb657d0e9c37392a1d5ec9929e6a5df4763ddc2d.wiki) ... [DONE]
Does this MR meet the acceptance criteria?
Conformity
-
Changelog entry -
Code review guidelines -
Merge request performance guidelines -
Style guides -
Separation of EE specific content
Related to #254964 (closed)