Troubleshooting
”graft is already initialized”
You tried to rungraft init on a container that already has a Graft project. Each container can only be initialized once.
“no volumes attached” or “no named volumes found”
The target container must have at least one Docker volume mounted. Database containers typically mount a volume at the data directory. Fix: Ensure your container uses a named Docker volume:Container Not Found
Postgres Fails to Start After Checkout
If Postgres fails to start after switching branches, the data directory may be corrupted or from an incompatible version. Common causes:- Switching between different Postgres major versions
- Manual modification of files in the branch directory
- Insufficient disk space
Schema Version Mismatch
rsync Not Found
Graft usesrsync for the initial Docker-volume-to-host bridge. If it’s not installed:
Docker Not Available
Graft requires the Docker Engine to be accessible via the Docker API. Fix: Ensure Docker is running and the socket is accessible:~/.docker/run/docker.sock. Graft auto-discovers this path.
Permission Errors on Bind Mount
Database engines run as specific UIDs (Postgres = 999). If bind-mounted files have wrong ownership: Fix: The source files should already have correct permissions (they came from a working container). If you manually copied or modified files, ensure ownership matches:“failed to restart container”
The container couldn’t be restarted after a commit or checkout. This is usually a transient Docker issue. Fix: Start the container manually:Integrity Failure
graft verify reports ✗ Integrity FAILED. This means the files on disk don’t match the Merkle root recorded in the DAG.
Common causes:
- Database was running when files were modified
- Manual file edits in the branch directory
- Disk corruption