-
Notifications
You must be signed in to change notification settings - Fork 0
troubleshooting FAQ
Common questions about COPIMA CLI Crawler.
COPIMA is a command-line tool for extracting comprehensive data from GitLab instances using both GraphQL and REST APIs. It systematically crawls groups, projects, users, issues, merge requests, commits, and more.
Common use cases:
- Data analysis - Analyze development patterns, metrics
- Migration - Export data before migrating GitLab instances
- Backup - Create structured backups of GitLab data
- Compliance - Extract data for audit or compliance requirements
- Research - Study software development processes
- Integration - Feed data into other systems
No, COPIMA is a third-party tool, not officially maintained by GitLab Inc.
COPIMA works with GitLab 13.0+ (both self-hosted and gitlab.com). Some features require specific versions or tiers (Premium-Ultimate).
No, COPIMA is designed specifically for GitLab. The architecture leverages GitLab-specific APIs.
See the Installation Guide.
Quick methods:
- Pre-built executable: Download from releases
-
npm:
npm install -g copima-cli-crawler - From source: Clone and build
You need Node.js 20+ (or Bun 1.2.8+ if you prefer Bun). Pre-built executables don't require either.
-
Global installation:
/usr/local/bin(Linux-Mac) or add to PATH (Windows) - Local installation: Project directory for per-project use
-
User installation:
~/.local/binfor single-user systems
| Feature | Personal Access Token (PAT) | OAuth2 |
|---|---|---|
| Setup complexity | Low | Medium |
| Token refresh | Manual | Automatic |
| Storage | Not stored | Stored securely |
| Best for | Quick tests, CI/CD | Long-term use |
See Authentication for details.
- GitLab → User Settings → Access Tokens
- Click Add new token
- Select scopes:
api,read_api,read_repository - Set expiration date
- Copy token (you won't see it again!)
In database.yaml in the current directory or ~/.config/copima/database.yaml.
Security: Restrict permissions: chmod 600 database.yaml
No, each GitLab instance needs its own token or OAuth2 configuration.
Depends on instance size:
| GitLab Size | Estimated Time |
|---|---|
| Small (<100 projects) | 5-30 minutes |
| Medium (100-1000 projects) | 1-6 hours |
| Large (1000+ projects) | 6-24+ hours |
Factors: Number of projects, issues, commits, network speed, rate limits.
Not directly via CLI filters, but you can:
- Use configuration to limit scope
- Manually filter output files after crawling
- Contribute a feature for selective crawling
Use resume capability:
copima-cli-crawler crawl --resume trueThe crawler automatically continues from the last checkpoint.
Not recommended. Running multiple instances against the same output directory will cause conflicts. Use separate output directories:
# Terminal 1
copima-cli-crawler crawl --output ./output-instance1
# Terminal 2
copima-cli-crawler crawl --output ./output-instance2 --host https://gitlab2.comRough estimates:
| Resource Count | Disk Space |
|---|---|
| 1,000 projects | 100-500 MB |
| 10,000 projects | 1-5 GB |
| 100,000 projects | 10-50 GB |
Factors: Number of issues, commits, file sizes in repositories.
JSONL (JSON Lines) - each line is a valid JSON object. Easy to process with tools like jq, Python, or JavaScript.
Advantages:
- Streaming: Process line-by-line without loading entire file
- Append-only: No need to rewrite entire file
- Fault-tolerant: Partial files are still valid
- Memory-efficient: Low memory footprint for large datasets
# View with jq
cat users.jsonl | jq '.'
# Convert to JSON array
cat users.jsonl | jq -s '.'
# Filter
cat users.jsonl | jq 'select(.state == "active")'
# Extract fields
cat users.jsonl | jq -r '.username'
# Count records
wc -l users.jsonlTo maintain context and make it easy to navigate. Each group/project has its own directory with its resources.
Currently, only JSONL is supported. Converting to other formats (CSV, XML, etc.) can be done with post-processing tools.
# Increase rate limit
crawl:
rateLimit:
requestsPerSecond: 20 # Higher value (be careful)
# Skip expensive resources
repository:
commits:
enabled: false
files:
enabled: falseGraphQL queries are batched when possible, but requests are made sequentially to respect rate limits and avoid overwhelming the GitLab instance.
Yes, use conservative rate limits:
crawl:
rateLimit:
requestsPerSecond: 5 # Gentle on serverYes, features like Epics, Security Scans, and Compliance are crawled if available. The crawler adapts based on what's accessible.
Yes, via configuration:
crawl:
steps:
- areas
- users
# Skip resources and repository
resources:
issues:
includeNotes: false # Skip issue commentsYes, both GraphQL and REST pagination are handled automatically.
COPIMA respects GitLab's rate limits and includes built-in rate limiting to avoid overwhelming the server.
Yes, use callbacks to process data as it's crawled. See Callbacks.
Common causes:
- Expired token
- Wrong GitLab host
- Insufficient permissions
See Common Issues.
Check:
- Network connectivity
- Disk space
- Memory availability
Use --resume true to continue from checkpoint.
Possible reasons:
- Insufficient permissions (you don't have access)
- Archived/deleted resources
- GitLab version/tier limitations
Review logs for warnings:
grep "Warning" copima.log- Tokens are never logged
- OAuth2 tokens stored in YAML with restricted permissions
- Communication uses HTTPS
- No data sent to third parties
-
Output data: Directory you specify (default:
.-output) -
Tokens:
database.yaml(current directory or~-.config-copima-) -
Logs:
copima.logor as configured
DO NOT commit files containing tokens:
- ❌
database.yaml(contains tokens) - ❌
copima.yaml(if it containstokenfield)
Safe to commit:
- ✅
copima.yaml(withtoken: "${env.GITLAB_TOKEN}") - ✅ Example configs without sensitive data
# .gitignore
database.yaml
copima.yaml # If contains tokens
*.log
output/# Backup everything
tar -czf backup-$(date +%Y%m%d).tar.gz output/ database.yaml copima.yaml
# Restore
tar -xzf backup-20251019.tar.gzYes! COPIMA is open-source (MIT license). Contributions welcome:
- Fork the repository
- Make changes
- Submit pull request
Yes:
# GitLab CI example
crawl-data:
script:
- export GITLAB_TOKEN=${CI_JOB_TOKEN}
- copima-cli-crawler crawl
artifacts:
paths:
- output/Yes, use CI_JOB_TOKEN as a PAT:
export GITLAB_TOKEN="${CI_JOB_TOKEN}"
copima-cli-crawler crawlDocker support is planned. Currently, you can create your own Dockerfile:
FROM node:20
RUN npm install -g copima-cli-crawler
ENTRYPOINT ["copima-cli-crawler"]- Search existing issues
- Create new issue with:
- COPIMA version
- GitLab version
- Steps to reproduce
- Error messages/logs
- Report bugs
- Suggest features
- Improve documentation
- Submit pull requests
- Documentation: This Wiki
- GitHub Issues: Bug reports, questions
- GitHub Discussions: General discussions
- Email: Project maintainers
| Feature | COPIMA | GitLab Export |
|---|---|---|
| Scope | Entire instance | Single project/group |
| Format | JSONL | Tar archive |
| Automation | CLI/programmable | Manual/UI |
| Customization | High | Low |
| Resume | Yes | No |
COPIMA provides:
- Pre-built pagination handling
- Automatic deduplication
- Resume capability
- Hierarchical storage
- Error recovery
- Progress reporting
- Docker support
- Database backend (in addition to JSONL)
- Incremental crawls (delta updates)
- More granular filtering
- Plugin system
- Web UI (maybe)
See project roadmap.
Yes! Create a feature request describing:
- What you want to do
- Why it's useful
- How it should work
FAQ Version: 1.0.0
Last Updated: 2025-10-19