The Wayback Machine - https://web.archive.org/web/20201211004924/https://github.com/github/backup-utils/issues/483
Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Restoring snapshot without /repositories/info to cluster fails with permission denied #483

Open
djdefi opened this issue Apr 6, 2019 · 0 comments

Comments

@djdefi
Copy link
Member

@djdefi djdefi commented Apr 6, 2019

This section of the restore code appears to fail when restoring to a cluster, if the snapshot does not contain /repositories/info:

bm_start "$(basename $0) - Updating repository info data"
if [ -d $GHE_DATA_DIR/$GHE_RESTORE_SNAPSHOT/repositories/info ]; then
ghe_verbose "* Transferring repository info data"
for hostname in $hostnames; do
if ! ghe-rsync -av --delete \
-e "ssh -q $opts -p $port $ssh_config_file_opt -l $user" \
--rsync-path="sudo -u git rsync" \
"$GHE_DATA_DIR/$GHE_RESTORE_SNAPSHOT/repositories/info/" \
"$hostname:$GHE_REMOTE_DATA_USER_DIR/repositories/info" 1>&3; then
echo "Error restoring /data/repositories/info to $hostname" 1>&2
fi
done
else

The glob doesn't appear to work:

$ sudo -u git ls -lah /data/repositories/info/*
ls: cannot access /data/repositories/info/*: No such file or directory
$ echo $?
0

$ sudo ls -lah /data/repositories/info
total 16K
drwxr-xr-x  2 git  git  4.0K Apr  2 03:38 .
drwx------ 19 git  git  4.0K Apr  2 03:35 ..
-rw-r--r--  1 git  git    21 Apr  2 03:34 nw-layout
-rw-r--r--  1 root root   11 Apr  2 03:38 svn-v4-upgraded```

Do we really want to remove these files, or is this left over code from supporting GitHub Enterprise 11.x backup / restore?

cc @jatoben

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
1 participant
You can’t perform that action at this time.