Netbeans: rsync with remote server

rsync netbeans

So you’re still using Eclipse/PDT because you see no way to rsync your local files with your remote dev machine.

This is the workaround I use:

  •  Create a “rsync.php” file in your project root, with this content. You’ll see this would be the Mac version, change the bits according yo your OS:


system(“/opt/local/bin/rsync -uvrz –chmod=uga+rx –delete-after –exclude-from=/Users/USERNAME/rsyncExclude.txt .  USERNAME@HOSTNAME:/home/USERNAME/PROJECT_PATH”);

  •  Create a rsyncExclude.txt file with the file patterns you need to avoid syncing and place it in your home dir:
  • Project > Properties > Run configuration

Run As: “script (run in command line)”

Make sure you configure the php cli.

Index file: rsync.php

Working directory: your project directory.

  •  That’s all. Now you can use “Run Project (F6)” to rsync.

Let me know if you’ve found another way to achieve this without hacking Netbeans.


Published by

Iván Mosquera Paulo

Software Engineer

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s