Using rsync with django

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

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:

rsync -avzh -C --delete -f '. ./.rsync-filter'

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

Comments support markdown

Comments are closed.

Comments have been close for this post.

About this post

Posted at 11:56 a.m. on January 29, 2009

Comments: 3

Tags: , , ,

Search Blog


Recent Posts

The role of designers in the Django community

5 months, 3 weeks Ago (Comments: 23)

Large Problems in Django, Mostly Solved: Documentation

5 months, 3 weeks Ago (Comments: 7)

A simple Perl IRCBot

6 months, 3 weeks Ago (Comments: 0)

More Posts...

Projects


Friends


Categories


Tag Cloud

abstract aggregator book classbased community conferences conventions core dash debugging deployment designers django djangocon doctest education eurodjangocon fixtures idea ideas iowa kong largeproblems lawrence mediaphormedia mentor middleware migrations music packaging parsing patterns pdb philosophy politics pony post-a-day postaday09 practical pretty production project projects python ramblings reusable review school screencast setuptools software solutions south sphinx ssh students talk teaching template-tags templates templatetags testing testing-series testmaker tip tips tutorial umw unittest

Archive


I may not have gone where I intended to go, but I think I have ended up where I intended to be.

- Douglas Adams