Topic "Syncrhonise local fails"

Author Message
amediacompany
[View user's profile]

Joined: 2013-01-14
Posts: 4
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?

Code:


#########################
# 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 http://winscp.net/eng/docs/file_mask
synchronize local -speed=1600 -filemask="|*.sql"

# close the session
close
    Advertisements
    martin
    [View user's profile]
    Site Admin
    Joined: 2002-12-10
    Posts: 24530
    Location: Prague, Czechia
    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.
    amediacompany
    [View user's profile]

    Joined: 2013-01-14
    Posts: 4
    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
    martin
    [View user's profile]
    Site Admin
    Joined: 2002-12-10
    Posts: 24530
    Location: Prague, Czechia
    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.
    _________________
    Martin Prikryl
    amediacompany
    [View user's profile]

    Joined: 2013-01-14
    Posts: 4
    prikryl 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
    amediacompany
    [View user's profile]

    Joined: 2013-01-14
    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
    Quote:
    System Error. Code: 32.

    AND
    Quote:
    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
    Advertisements

    You can post new topics in this forum






    Search Site

    What is WinSCP?

    It is award-winning SFTP client, SCP client, FTPS client and FTP client integrated into one software program for file transfer to FTP server or secure SFTP server. [More]

    And it's free!

    Donate

    About donations

    $9   $19   $49   $99

    About donations

    Recommend

    WinSCP Privacy Policy

    WinSCP License