• Kirill Smelkov's avatar
    gitlab-backup/restore: Allow restoration on higher GitLab version, if user requests so · a8ba07d5
    Kirill Smelkov authored
    Currently GitLab backup restoration works on exactly the same GitLab
    version, as the one with which the backup was made:
    
        https://gitlab.com/gitlab-org/gitlab-ce/blob/7383453b/lib/backup/manager.rb#L132
    
    However in many cases restoring backup on a newer GitLab version is
    desirable - e.g. when moving GitLab instance to upgraded software.
    GitLab answer - that we should first prepare exactly the same GitLab
    version on moved instance, restore backup, then upgrade GitLab itself
    _inplace_, is not satisfactory in e.g. slapos case - as upgrading can
    take a long time, and in-place software changes can render GitLab
    instance non-working.
    
    What we better prefer to do is to fully prepare new GitLab software
    version, and then knowing software is ready, restore backup in a quick
    manner.
    
    The following analysis says we should be 99% ok to do so:
    
    1. git-backup cares backward compatibility for format of repositories backup.
    2. db dump is backward compatible, because Rails, when seeing old db
       schema, will run migrations.
    3. the rest is relatively minor - e.g. uploads, which is just files in
       tar, and format for such things changes seldomly.
    
    because of 3, strictly speaking, it is not 100% correct to restore
    backup from older gitlab version to newer one (since gitlab does not
    provide a promise of backward compatibility on e.g. uploads/ backup
    format) , but in practice it is 99% correct and is usually handy.
    
    /cc @kazuhiko
    a8ba07d5
gitlab-backup 12.3 KB