« Django Conventions Project Update | Incredibly useful SSH flag »
Just a quick warning/tip on using Django with rsync, for other people pulling their hair out later.
When you use rsync a good way to get a directory is using rsync -aCq, which means recursively, quietly, move a directory ignoring common files. The -a command means 'archive'; keep permissions and as much data about the files as possible. We use -C because it ignores .pyc and .svn files. However, in the list of included files is 'core', so that you don't move over core dumps.
Django however has a core directory inside of it, and using -C causes rsync to ignore that directory. So we ended up using the rsync command like so:
rsync -aCq --include=core
Hopefully this saves people some time trying to rsync Django in the future. I'd be curious what other rsync commands that people use for moving around django and/or other files.
Comments have been close for this post.
Posted at 11:56 a.m. on January 29, 2009
Comments: 3
Tags: core , django , rsync , tip
Django Inspect: A generic introspection API for Django models
4 weeks Ago (Comments: 4)
The role of designers in the Django community
1 month Ago (Comments: 7)
Large Problems in Django, Mostly Solved: Documentation
1 month, 1 week Ago (Comments: 5)
2 months Ago (Comments: 0)
Correct way to handle default model fields.
3 months, 3 weeks Ago (Comments: 8)
I may not have gone where I intended to go, but I think I have ended up where I intended to be.
- Douglas Adams


Comments
1 Patrick Taylor says...
Thanks! I've been playing around with rsync and would probably have been tearing out what little hair I have left if I hadn't seen this.
Posted at 10:58 p.m. on January 29, 2009
2 Paul says...
What a funny little collision. Good catch!
Posted at 7:41 p.m. on January 30, 2009
3 Jordi Funollet says...
Almost the same, but with a lot of include/exclude on a hidden file:
This is easy to customize for every project and you can have files and dirs not replied. And force the 'django/core/' dir.
Posted at 6:46 p.m. on February 1, 2009