手順
基本的には以下の公式サイトの手順通りに行えばリストアできます。
注意点
BACKUP
オプションはバックアップファイルの日付の部分のみを指定する。
BACKUP=timestamp_of_backup (required if more than one backup exists)
例えば以下のようにファイル名を指定すると、語尾に_gitlab_backup.tar
がつけられ、ファイルが見つからない旨のエラーが発生します。
# gitlab-rake gitlab:backup:restore BACKUP=1487786527_2017_02_23_gitlab_backup.tar The backup file 1487786527_2017_02_23_gitlab_backup.tar_gitlab_backup.tar does not exist!
正しいコマンドは以下の通り。
# gitlab-rake gitlab:backup:restore BACKUP=1487786527_2017_02_23 #日付のみ指定
パスを指定する場合も_gitlab_backup.tar
は不要。
/mnt/backup/1487786527_2017_02_23_gitlab_backup.tar
にファイルがあるとすれば以下のように指定する。
# gitlab-rake gitlab:backup:restore BACKUP=/mnt/backup/1487786527_2017_02_23