Skip to main content

Troubleshooting

”graft is already initialized”

You tried to run graft init on a container that already has a Graft project. Each container can only be initialized once.
Fix: Delete the project directory and re-init:

“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

Fix: Verify the container exists and is spelled correctly:

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
Fix: Check the container logs:
Try rolling back to a known-good commit:

Schema Version Mismatch

Graft’s schema version changed in an incompatible way between releases. Fix: Delete the project data and re-initialize:

rsync Not Found

Graft uses rsync for the initial Docker-volume-to-host bridge. If it’s not installed:
Fix: Install rsync:

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:
On macOS, Docker Desktop creates the socket at ~/.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:
The Graft operation already saved your data — restarting resumes normal operation.

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
To investigate: