Synchronizing a single file from script

Advertisement

Lord Raiden
Joined:
Posts:
5

Synchronizing a single file from script

First of all, Thanks for all the work put in to this project! Very nice!!!

Version 4.1 Beta. FTP.

I am using a script to synchronize remote. I've searched the forum and documents and got most of my answers but am still stuck on one issue. When I specify an entire directory, it works great:

synchronize remote styles styles -mirror -delete    

But when I try to specify a single file it does nothing.

synchronize remote test.txt test.txt -mirror    

I get a message at the terminal
Nothing to synchronize
and the log shows
Collecting synchronization list for local directory 'test.txt' and remote directory 'test.txt', mode = 0, params = 4098

Is it unable to synchronize a single file? In our case we only want to synchronize a subset of the files.

Thanks for your time! :D

Reply with quote

Advertisement

martin
Site Admin
martin avatar
Joined:
Posts:
27,253
Location:
Prague, Czechia

Re: Synchronizing a single file from script

No the arguments must be paths.
But you can do:
option include test.txt
synchronize remote -mirror    
It is the same.

Reply with quote

Lord Raiden
Joined:
Posts:
5

Re: Synchronizing a single file from script

martin wrote:

No the arguments must be paths.
But you can do:
option include test.txt
synchronize remote -mirror    
It is the same.

Thanks for your response. So if I use "include" in the root dir to mask specific files then i need to clear the include mask to use "exclude" when calling subdirectories as follows:

option include test.txt
synchronize remote -mirror
option include *
option exclude .svn
synchronize remote styles styles -mirror -delete    

This appears to work from what I tried but wanted to check with you about clearing the include mask.

Thanks again for your time!!!

Reply with quote

martin
Site Admin
martin avatar
Joined:
Posts:
27,253
Location:
Prague, Czechia

Re: Synchronizing a single file from script

Lord Raiden wrote:

So if I use "include" in the root dir to mask specific files then i need to clear the include mask to use "exclude" when calling subdirectories as follows:
Exclude and include are exclusive. Setting one clears the other.
_________________
Martin Prikryl

Reply with quote

Lord Raiden
Joined:
Posts:
5

nuts

Okay, so I think I know why I'm having a problem. Am I correct that timestamp preservation is not available in FTP?

Our server does not have SFTP so we are using FTP. If so, using "-mirror" does not work since we can't preserve the timestamp. So every time we FTP we copy the whole barn.

Any work-around to that???

Thanks

Reply with quote

martin
Site Admin
martin avatar
Joined:
Posts:
27,253
Location:
Prague, Czechia

Re: nuts

Sorry, I haven't noticed that you use FTP. No, unfortunately FTP protocol does not allow updating remote timestamps :-(
_________________
Martin Prikryl

Reply with quote

martin
Site Admin
martin avatar
Joined:
Posts:
27,253
Location:
Prague, Czechia

Re: nuts

You can try synchronizing files with different size.
_________________
Martin Prikryl

Reply with quote

Lord Raiden
Joined:
Posts:
5

Problem with the size method is the whole binary vs ascii transfer problem. Most of our files are ascii so we'd have a lot of resending when it's not really needed when the size changes. And we have concerns about breaking things by sending them all by binary. ".htaccess" files would break and there are others too.

However, I was able to get SFTP set up and WOW your application runs AWESOME on SFTP!! VERY NICE!!! I know that your focus is on SFTP and I don't know if it is problems with FTP but I couldn't stay connected longer than 5 minutes without having to re-connect, and FYI: when transfering a lot of files it lost connection virtually every time in the middle of transfering. And despite automatically reconnecting it would often still fail out leaving files and directories only half done corrupting the web site.

But using SFTP I left it connected for 2 days straight with zero problems and transfers run perfectly EVERY TIME!!!

Many kudos on your great job on this product!!! Thanks for your time and help with questions too!

Reply with quote

Advertisement

You can post new topics in this forum