-
Notifications
You must be signed in to change notification settings - Fork 38
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
When try upload docker(hosted) repository from backup he was not uploaded #571
Comments
@030 Yes, repository created and I try backup\upload right like in docker.md If this help, that is my steps
Everything seems to be the same as described in the documentation Debug Log: n3dr-backup-upload.log But I don’t understand, is this a problem with the script or something with the code? What also confuses me is that the size of the backup copy of docker repository is in Kb. |
One small question about backup docker repositories When I backup repo, who contain images with command n3dr repositoriesV2 -u $nx_user -p $nx_pwd -n $nx_url \
--dockerPort $nx_dport --dockerHost $nx_dhost \
--showLogo=false --logFile $flogs --logLevel=debug --https=false \
--backup --directory-prefix $nx_backup_prefix --n3drRepo $nx_brepo_name What I should get in backup directory? I has only some manifests from repository, not images. |
In general, after several days of research, this utility is not entirely suitable for me personally. The --backup flag makes a copy of the entire nexus. The --n3drRepo flag does not support docker. And the p2iwd utility does not work quite correctly with the registry that nexus creates. As a result, I converted backup\upload to a simple bash script. IMAGES=$(curl -s "https://$NEXUS_OLD_URL/v2/_catalog" | jq -r '.repositories[]')
for image in $IMAGES; do
TAGS=$(curl -s "https://$NEXUS_OLD_URL/v2/$image/tags/list" | jq -r '.tags[]')
for tag in $TAGS; do
docker pull "$NEXUS_OLD_URL/$image:$tag"
docker tag "$NEXUS_OLD_URL/$image:$tag" "$NEXUS_NEW_URL/$image:$tag"
docker push "$NEXUS_NEW_URL/$image:$tag"
# docker rmi "$NEXUS_NEW_URL/$image:$tag"
done
done |
What happened:
We has two nexus3 - old and new. We try create backup docker(hosted) repository from nexus.old and upload to nexus.new.
For this used https://github.com/030/n3dr/blob/main/cmd/n3dr/repositoriesV2.go#L63C98-L63C111
First, create backup
The command executed without errors. Something has downloaded.
In nexus.new create docker(hosted) repository "nx_docker_hosted" and execute script
Command write this in log and nothing uploaded
What you expected to happen:
Backup\upload docker repositories is supported by n3dr or I do something wrong?
How to reproduce it (as minimally and precisely as possible):
Anything else we need to know?:
nexus.old and nexus.new - two separate servers
all scripts are executed from "same as nexus server" linux machine (not in a nexus servers)
Environment:
n3dr -v
): n3dr version refs/tags/7.5.2 (installed from snap)cat /etc/os-release
): ubuntu 22.04 lts serveruname -a
):The text was updated successfully, but these errors were encountered: