1
votes

I have project on the remote server and a copy of it on my localhost. Each day, when work is done I'm uploading project from localhost to remote server using Dreamveawer's sync function. It defines which files where creared/updated/deleted and updates them on the remote host.

Today I've changed Dreamveawer to more comfortable PHP IDE (phpDesigner) and there is a problem, there is no function to upload only changed files to the remote FTP server.

How can I do this? Maybe with the help of SVN or something else?

P.S. On development machine I use Windows, on remote host - *nix

3
Would you clarify what operating systems you have at your desktop and at the host?halfer

3 Answers

3
votes

Might I suggest a different approach? It's not exactly syncing your stuff automatically per se, but it is a good method of keeping everything kosher across the board. Would help with the issue of overwriting something in either direction. It will also give you a history to revert back to should something go wrong after hours of coding, only to find out you just made a mess...

My suggestion would be something like Git, GitHub in particular. Of course GitHub has a open source mentality so anything you put up there will be publicly available unless you are willing to pay for a private account. On the flip side, there is the option to setup your own personal private git server either on your hosting server if you have those type of privileges or even locally on a spare drive. Though setting up git is kinda hairy sometimes depending on which route you go. There's also SVN (Subversion) same concept, different style of doing it.

All around both are good ideas in my book. So many pluses. I believe also there are scripts or APIs with GitHub that you can use to run through something like a cronjob on your hosting server again if your host allows it. that you can just have run every day, week, every 12 hours? whatever. that can check to see if there's anything new, and if so apply it.

I am for that rsync option if you have it accessible. But setting it up on your local machine depending on what OS you have might be tricky in itself. Otherwise, there are some commercial products you could purchase that have the ability to run over your project directory and remote directory that you could purchase and act similar to an FTP. These require SSH I believe though in most cases.

Personally I have tried a few FTP programs in my time that claim syncing, have also attempting to use DreamWeaver's ability. But I don't like them; they cause more headaches than they were worth in most cases. All in all, I would go the git or svn route personally.

0
votes

Does your host support rsync? That would do the trick very nicely. You also need support on your development machine; this is easily available on Mac and Linux, and can be had on Windows with some fiddling (search for cwRsync for the latter).

If that option is not open to you on your host, do at least switch to SFTP if it is offered. It is more secure than FTP, since the password/data is not sent in plain text.

Edit: yes, you can do this with Subversion - do you know that the host supports the svn command?

0
votes

netbeans does a great job about sync here is how to set up this https://blogs.oracle.com/netbeansphp/entry/remote_synchronization