Syncrhonise local fails

Advertisement

amediacompany
Joined:
Posts:
4

Syncrhonise local fails

Hello,

I'm using WinSCP 5.1.3 and this is failing. I was using 5.1.2 and it should have worked, but stopped about a month ago. I can't work out why as the remote directory has new files every 2 days.


Intention:
1) Login to the remote server
2) copy the database backups* to the local machine.
*the files are *.sql.gz files (gzipped SQL files) in dated directories (e.g. 2012-12-15/*.sql.gz)

I thought that the filemask was causing the problem, but I can't see that being a problem as removing it does *nothing* I get *no* error messages at all, and see the synchronise command taking stock of the local directories, but never downloading remote directories/files. I've checked that the files exist on the remote server.

Any thoughts?

#########################
# DB Server             #
#########################

open "DB server"

option transfer
option batch off

# just to make this clear
# local directory
lcd "C:\Backups (local)\database backup"
# remote directory
cd "/media/db-backup"

# copy remote to local at 1600kbips to not knacker the server
# pipe excludes sql files as they're not complete
# see https://winscp.net/eng/docs/file_mask
synchronize local -speed=1600 -filemask="|*.sql"

# close the session
close

    Reply with quote

    Advertisement

    martin
    Site Admin
    martin avatar
    Joined:
    Posts:
    41,518
    Location:
    Prague, Czechia

    Re: Syncrhonise local fails

    Please attach a full log file showing the problem (using the latest version of WinSCP).

    To generate log file, use /log=path_to_log_file command-line argument. Submit the log with your post as an attachment. Note that passwords and passphrases not stored in the log. You may want to remove other data you consider sensitive though, such as host names, IP addresses, account names or file names (unless they are relevant to the problem). If you do not want to post the log publicly, you may email it to me. You will find my address (if you log in) in my forum profile. Please include link back to this topic in your email. Also note in this topic that you have emailed the log.

    Reply with quote

    amediacompany
    Joined:
    Posts:
    4

    Log file is emailed to you

    I've emailed the log to you, and removed a couple things (server names) from the logs.

    It seems that if a directory actually exists locally, then the synchronise works, but I would expect it to replicate new directories that are on the remote server.

    Email subject of what I sent: [b]debug log for "Syncrhonise local fails"[/b].

    Server details:
    1) ubuntu 11.10 with SSH daemon up to date
    2) Centos 5.5

    on that basis, it does not appear to be a server related issue

    Reply with quote

    martin
    Site Admin
    martin avatar

    Re: Log file is emailed to you

    As I wrote, WinSCP does not create the target directoy. It has to exist prior to synchronization. It creates new subdirectoris in the target directory though.
    So I believe there's no issue.

    Reply with quote

    amediacompany
    Joined:
    Posts:
    4

    Re: Log file is emailed to you

    martin wrote:

    As I wrote, WinSCP does not create the target directoy. It has to exist prior to synchronization. It creates new subdirectoris in the target directory though.
    So I believe there's no issue.

    But here the remote and target directories *do* exist. It's the subdirectories that are not created even though remote files which don't exist should be matched. It's that which confuses me.

    Remotely I have:
    [remote]/25-01-2013

    Locally the subdirectory does not exist, but the target directory does exist, so I would expect that WinSCP creates: [target]/25-01-2013

    Reply with quote

    Advertisement

    amediacompany
    Joined:
    Posts:
    4

    An update. Martin and I have had a look at my debug log, and it seems that one of my sessions failed with a permissions error, and I thought I had not changed things. Apparently at least one of the files I had running was in use by another process.

    We're not sure where the problem is, but in case anyone else has a similar problem, please look in the debug log for
    System Error. Code: 32.
    AND
    Can't create file

    I'm checking what user my script runs with; it should be 'me', and will update this thread if I find anything interesting/helpful

    Reply with quote

    Advertisement

    You can post new topics in this forum