Commit Graph

177 Commits

Author SHA1 Message Date
gfyoung c858f70d07 Enable frozen string for lib/gitlab/*.rb 2018-10-22 07:00:50 +00:00
Balasankar "Balu" C 91ef6989d1
Add installation type to backup information file 2018-10-05 19:34:22 +05:30
gfyoung 3836d69119 Enable frozen string in lib/api and lib/backup
Partially addresses #47424.

Had to make changes to spec files because
stubbing methods on frozen objects is a mess
in RSpec and leads to failures:

https://github.com/rspec/rspec-mocks/issues/1190
2018-09-29 21:04:50 -07:00
Zeger-Jan van de Weg d7afed34c4
Remove feature flags from lib/backup
Moved to OPT_OUT in 7d14b725a0, Now, by
removing the feature gates, this is an mandatory feature.

Related issues:
- https://gitlab.com/gitlab-org/gitaly/issues/526
- https://gitlab.com/gitlab-org/gitaly/issues/1194

Closes https://gitlab.com/gitlab-org/gitaly/issues/749
Closes https://gitlab.com/gitlab-org/gitaly/issues/1212
Closes https://gitlab.com/gitlab-org/gitaly/issues/1195
2018-07-31 15:24:19 +02:00
Jacob Vosmaer 7d14b725a0 Move repo backup RPC's to opt-out 2018-06-25 16:21:54 +02:00
Ahmad Hassan 099eb8ae40 Restore custom hooks for wiki 2018-06-21 13:56:00 +02:00
Ahmad Hassan 9d7e73277e Move backup custom hooks up a level 2018-06-20 11:43:59 +02:00
Ahmad Hassan 5308b51ef4 Output done for wiki and repo 2018-06-19 16:24:16 +02:00
Ahmad Hassan 69de7b42cf Migrate repo backup to gitaly 2018-06-15 18:27:25 +02:00
Douwe Maan f068479e63 Merge branch 'use-restore-custom-hooks-gitaly' into 'master'
Use RestoreCustomHooks RPC in restore rake task

See merge request gitlab-org/gitlab-ce!19370
2018-06-08 11:49:13 +00:00
Ahmad Hassan 59a8c79f05 Use RestoreCustomHooks RPC in restore rake task 2018-06-07 14:26:20 +02:00
Jacob Vosmaer 6dfb0b4b31 Consistently use tar lookup function 2018-06-07 13:39:34 +02:00
Jacob Vosmaer (GitLab) a0808df0b6 Find and mark more Git disk access locations 2018-06-05 15:51:14 +00:00
Jacob Vosmaer (GitLab) b529d04b69 Use Gitaly's DeleteAllRepositories RPC during backup restore 2018-05-28 09:58:14 +00:00
Douwe Maan ba58a66a55 Merge branch 'migrate-restore-repo-to-gitaly' into 'master'
Use gitaly repository_service.CreateRepositoryFromBundle to restore (rake task)

Closes charts/gitlab#390

See merge request gitlab-org/gitlab-ce!18644
2018-05-24 18:28:23 +00:00
Stan Hu e6fca03bbd Fix backup creation and restore for specific Rake tasks 2018-05-24 14:58:25 +00:00
Ahmad Hassan 84e6ddb41f Remove unneeded gitaly_migrate function 2018-05-24 14:16:31 +02:00
Ahmad Hassan 9c4f967785 Take restoring custom hooks and the skip flag out of scope 2018-05-23 13:47:56 +02:00
Ahmad Hassan 80197bdc62 Remove gitaly_migrate blocks and replace by early return 2018-05-21 11:45:41 +02:00
Ahmad Hassan 125be1865b Move restore_custom_hooks to its seperate function 2018-05-18 11:55:54 +03:00
Ahmad Hassan 62f2988713 Return from prepare directory if gitaly skip is enabled 2018-05-17 15:36:58 +03:00
Ahmad Hassan 42cabcb1c4 Call path_to_repo only when using gitaly 2018-05-17 15:34:31 +03:00
DJ Mountney 889c62c1e3 Link to upstream gitaly issues for the missing restore paths 2018-05-16 13:28:15 +03:00
DJ Mountney b8b82aa50e Fix the paths for wiki restore 2018-05-15 16:43:04 +03:00
DJ Mountney d5bd61e82f Output project name before restoring each project repo 2018-05-15 16:43:04 +03:00
DJ Mountney 4ea9458bbe Remove hooks restore that is no longer necessary 2018-05-15 16:43:04 +03:00
DJ Mountney 2bcc324f26 Add back some of the non-gitaly restore functionality behind gates 2018-05-15 16:43:04 +03:00
Ahmad Hassan 0734da16f6 Wrap create_from_bundle in a begin rescue block 2018-05-15 16:43:04 +03:00
Ahmad Hassan 8457262125 Better repo restore progress logging 2018-05-15 16:43:04 +03:00
Ahmad Hassan fb54eb76ee Remove useless print line 2018-05-15 16:43:04 +03:00
Ahmad Hassan 3b5e9f0608 Use gitaly repository_service.CreateFromBundle to restore 2018-05-15 16:43:04 +03:00
Bob Van Landuyt e3ff928c75 Describe workaround when restore fails because of `Errno::EBUSY`
When `Errno::EBUSY` is raised during restore, this could indicate that
the directory being restored into is a mountpoint. In this case we
explain the user how to retry the restore.
2018-04-23 17:24:29 +02:00
Balasankar "Balu" C 8785f23795 Move existing dirs to a temp location while restore
Instead of renaming existing storage directories to a timestamped
format, create a timestamped directory in a temporary location and move
the individual files and folders inside storage directories to it. This
helps us with nested storage directories.
2018-03-30 11:38:36 +05:30
Jacob Vosmaer 008a6a6ce6 Route path lookups through legacy_disk_path 2018-03-21 18:18:32 +01:00
Micaël Bergeron 2057a6acde port of 594e6a0a625^..f74c90f68c6 2018-02-01 12:14:46 -05:00
Douwe Maan f084525fe4 Merge branch 'print-list-of-available-backups' into 'master'
List backups avilable for restore

See merge request gitlab-org/gitlab-ce!16465
2018-01-16 16:40:20 +00:00
Balasankar "Balu" C 5a8cf78d51 Move conditional to a separate method 2018-01-15 23:52:00 +05:30
Balasankar "Balu" C ad25ef1f0d List available backups for restore 2018-01-15 20:33:35 +05:30
🙈 jacopo beschi 🙉 729f05f0e3 Adds Rubocop rule for line break around conditionals 2018-01-11 16:34:01 +00:00
julien MILLAU a331a06aa8 Ignore "lost+found" folder during backup on a volume 2017-12-20 08:11:13 +00:00
Zeger-Jan van de Weg 03ac8d5d0b Remove Rugged::Repository#empty? 2017-12-07 15:33:30 +00:00
Kamil Trzcinski 871de0f185 Rename artifacts_* to legacy_artifacts_* 2017-12-03 12:04:49 +01:00
Gabriel Mazetto f4c7fea613 Fix dumping hashed storage based repository 2017-11-15 15:20:36 +01:00
Maxim Rydkin 1833328b30 Decrease ABC threshold to 54.28 2017-10-22 17:12:35 +00:00
Rémy Coutable 8b8bab118e Stub ENV in the backup task spec file
Signed-off-by: Rémy Coutable <remy@rymai.me>
2017-10-18 18:42:09 +02:00
Stan Hu f3f304dc06 Ensure all refs are restored on a restore from backup
To restore all refs from a bundle, we need to use the --mirror option to
ensure that all refs are properly restored. Without this, refs such as
`refs/merge-requests/X` and `refs/keep-around/Y` would be omitted, which
exposed a bug as described in https://gitlab.com/gitlab-org/gitlab-ce/issues/38319#note_41648608.

Closes #38352
2017-09-29 15:17:05 -07:00
Tiago Botelho 4c5acddaa7 Adds EE tag detection to remove_old in gitlab backup. 2017-09-21 13:00:58 +01:00
Tiago Botelho 0a60698892 Tighten up remove_old regex from gitlab backup manager. 2017-09-20 12:11:14 +01:00
Gabriel Mazetto d17a7be830 Refactor project and storage types 2017-08-22 06:33:20 +02:00
Rémy Coutable c946ee1282
Enable the Layout/SpaceBeforeBlockBraces cop
Signed-off-by: Rémy Coutable <remy@rymai.me>
2017-08-09 11:52:22 +02:00