scm-backup
scm-backup copied to clipboard
Fetch error after 256 repos
Running SCM backup on our bitbucket cloud instance fails before getting halfway through. Interestingly I noted that the number of successfully fetched repos is exactly 256.
Here's the error:
2022-03-28 15:32:19.7931|ERROR|ScmBackup|fatal: protocol error: unexpected 'Error running git: fork/exec /usr/bin/git-upload-pack: no such file or directory'
2022-03-28 15:32:19.7931|ERROR|ScmBackup|Backup failed!
2022-03-28 15:32:19.7931|ERROR|ScmBackup|The application will close in 5 seconds!
Hmm...this exact error message was already reported multiple times (#57, #58), and one user even had something similar where the error always occured after 250 repos: #33
Always with Bitbucket, but unfortunately I wasn't able to reproduce or fix it yet.
- Did it work before and stopped working, or are you a new SCM Backup user and it never worked?
- Can you try the steps SCM Backup does directly in Git, with the repo where the problem occured?
- Can you show me a logfile?
(if you don't want to show it here in public but don't mind showing it to me, you can mail it to me)
Solved...
SCM fails when it hits a completely empty repo. Deleted the repo in Bitbucket and haved backed up all repos now, thank you.
If I may recommend, perhaps clearer context in the log entries would help pinpoint the suspect repo causing the failure. The log entry where it fails does not indicate the repo that caused the failure, and I had assumed that prior log entries were representative of only a successful clone. Ideally, 'Cloning...' and 'Cloned/success' entries would provide better debug tracing imo.
Do you remember how exactly you created that empty repo?
I'm still not able to reproduce this.
I create a new empty repo in one of my workspaces and select the options NOT to create a readme/.gitignore:
The result does look empty:
But the backup works without errors:
2022-04-28 19:45:22.4233|INFO|ScmBackup|SCM Backup 0.0.0-DEV 2022-04-28 19:45:22.4695|INFO|ScmBackup|https://scm-backup.org/ 2022-04-28 19:45:22.4695|INFO|ScmBackup|Operating system: Microsoft Windows 10.0.19043 2022-04-28 19:45:22.6483|INFO|ScmBackup|Backing up config files 2022-04-28 19:45:22.6483|INFO|ScmBackup|Getting repositories for source 'emptytest' from hoster 'bitbucket' 2022-04-28 19:45:23.7068|INFO|ScmBackup|Trying to find SCMs on this machine... 2022-04-28 19:45:23.8562|INFO|ScmBackup|Found Git 2.31.1.windows.1
2022-04-28 19:45:23.8562|INFO|ScmBackup|Backing up source: emptytest 2022-04-28 19:45:27.4320|INFO|ScmBackup| Git: https://bitbucket.org/MYWORKSPACE/empty-test.git 2022-04-28 19:45:28.8071|INFO|ScmBackup| Git: https://bitbucket.org/MYWORKSPACE/testrepo1.git 2022-04-28 19:45:30.5103|INFO|ScmBackup|Backup finished! 2022-04-28 19:45:30.5103|INFO|ScmBackup|The backups are in this directory: c:\scm-backup
Unfortunately no. The empty repo was likely created unintentionally by one of our staff many years ago.