Search code examples
symfonydeploymentrsyncremote-server

deploy project to remote server with rsync command


I'm using rsync command to deploy symfony 4 project to remote server, every time when I make new change the command deploy all the project's file instead of new files !! which option to add to tell rsync that should only transfer new changes!

I'm using rsync like that :

rsync -av LocalProjectPath RemotePerverPath --include=public/.htaccess --include=public/build --include=vendor  --exclude=".*"

Solution

  • I can refer you to this page for detailed information:

    https://www.tecmint.com/sync-new-changed-modified-files-rsync-linux/

    rsync has built-in parameters for those purposes

    "--ignore-existing" allows you to transfer only new files.

    "--update --dry-run" allows you to transfer only updated and modified files.