Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

have to make incremental backups with rsync and dropbox. The simple scenario is like this

Say I have some directories under my home directory, like


and under them, I have files with extensions

.py for python
.m  for MATLAB
.cc for C++
.tex for LaTeX
.inp or .mac for ANSYS 

I would like to backup these directories and only the files with the specified extensions under these directories. I am reading the rsync documentation, so for extensions it is possible to create a file, say 'extensions', and use --include-from=extensions.

I also read about the --files-from=FILE option, first I thought of creating a another file with the directories to be used in the backup and use the --no-relative option(since --relative is the default), however this is not working

What is the mistake in this reasoning? or what could be a better way to accomplish the above scenario?

share|improve this question

migrated from Mar 30 '13 at 11:38

This question came from our site for professional and enthusiast programmers.

Those are all source code files. If you put them in a version control system (Mercurial or git is really easy to start with) and push changes to a remote repo (that is being backed up or mirrored again), then you don't really need another backup scheme. – Thilo Mar 30 '13 at 9:54
well, I am using git already, but just could not understand how to do this with rsync, most probably there is a misunderstanding... – Umut Tabak Mar 30 '13 at 9:56
maybe this is helpful then:… – Thilo Mar 30 '13 at 9:58
What is the rsync command you are trying? What result are you getting? How is it not working? – terdon Mar 30 '13 at 15:52

You must log in to answer this question.

Browse other questions tagged .