Course Sync Tutorial¶
Learn how to synchronize courses between Canvas instances.
Overview¶
Canvas CLI's sync feature allows you to:
- Copy course content between instances (production ↔ sandbox)
- Migrate courses between semesters
- Maintain course templates
Prerequisites¶
- Canvas CLI installed
- Access to both source and destination Canvas instances
- Appropriate permissions on both instances
Step 1: Configure Multiple Instances¶
First, set up both Canvas instances:
# Add production instance
canvas config add production --url https://canvas.example.com
# Add sandbox instance
canvas config add sandbox --url https://canvas-sandbox.example.com
Then authenticate with each:
Verify your instances:
Output:
Step 2: Identify Source Course¶
Find the course you want to sync:
Note the course ID you want to sync.
Step 3: Create Destination Course¶
If needed, create a new course on the destination:
Or identify an existing course:
Step 4: Sync Course Content¶
Sync the course using the following syntax:
Example - sync course 123 from production to course 456 on sandbox:
Interactive Mode¶
For conflict resolution during sync:
Step 5: Verify Sync¶
Check the destination course:
canvas modules list --course-id 456 --instance sandbox
canvas assignments list --course-id 456 --instance sandbox
Use Cases¶
Development Testing¶
Sync a production course to sandbox for testing changes:
Semester Rollover¶
Copy a course template to create a new semester's course:
Multi-Institution Deployment¶
Sync course content between institutions:
# Configure second institution
canvas config add partner --url https://partner.instructure.com
canvas auth login --instance partner
# Sync course
canvas sync course production 123 partner 456
Syncing Assignments Only¶
To sync only assignments between courses:
Example:
Tips¶
Enrollment Data
Sync does not copy enrollment or grade data. Only course structure and content are synced.
Verify Before Production
Always sync to a sandbox first to verify the results before syncing to production.
Verbose Mode
Use --verbose to see detailed progress during sync:
Troubleshooting¶
Permission Denied¶
Ensure you have the required permissions: - Source: Read access to course content - Destination: Write access to create/update content
Content Not Syncing¶
Some content types have dependencies: - Module items require modules to exist first - Assignment groups should sync before assignments
Rate Limiting¶
For large syncs, Canvas CLI automatically handles rate limiting. If you see rate limit errors, the CLI will retry automatically.