2

How to rsync only svn controled files from directory where are files under version control and files not under version control. Only svn controled files needs to be rsynced.

Motivation was move only necessary file to production and keep back all the other files like in .svn folder. There is potential of security risk if those files are on public server.

3

I would think about generating a list of files under SVN control (there must be an svn command for this) and then use this with the --files-from=FILE option of rsync (see man rsync).

  • 2
    +1. "svn list -R" will do the job – Sirex Nov 25 '10 at 14:37
0

Not sure why you would be doing this. Would svn export do what you want? This can be used to setup a tree on which you use rsync.

For production or testing websites, I generally recommend updating from a version which has been exported and archived. The archive is promoted through the release cycle.

  • Yes, the thing stay between testing and production. This is due security reason, we filter in production all svn and not wanted files. Historicaly we get an attack via svn files on production. – Vaclav Kohout Nov 26 '10 at 9:35
  • Thats why I generate an archive from testing and migrate that. If you can keep testing stable, you could use rsync instead. You don't need svn in production for that. Where possible production files are not writeable by the userid used by the web server. – BillThor Nov 27 '10 at 23:55

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.