Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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

   Python
   MATLAB
   C++
   LaTeX
   ANSYS

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
    
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: stackoverflow.com/questions/1960799/… –  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
add comment

migrated from stackoverflow.com Mar 30 '13 at 11:38

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

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.