Getting a strange error

3 posts / 0 new
Last post
danlee
Offline
Last seen: 8 years 8 months ago
Joined: 26.04.2012 - 03:10
Getting a strange error

rsync: chown "/cygdrive/E/backup/mysql/daily/XXXXX_production/.daily_XXXXXXX_production_2012-04-24_22h20m_Tuesday.sql.gz.o4Ncpp" failed: Invalid argument (22)

 

Even though I see the error, seems to transfer over the files without issue, would be good to get rid of the error.

 

I am using a batch script to get my rsync working.

 

@ECHO OFF

REM Make environment variable changes local to this batch file

SETLOCAL

 

REM where to find rsync and related files

SET CWRSYNCHOME=C:\Program Files (x86)\cwRsync

 

REM Set HOME variable to your appdata directory. That makes sure that

REM ssh command creates known_hosts in a directory you have access.

SET HOME=C:\Users\Administrator.SERVER\AppData\Roaming

 

REM Make cwRsync home as a part of system PATH to find required DLLs

SET CWOLDPATH=%PATH%

SET PATH=%CWRSYNCHOME%\BIN;%PATH%

 

"C:\Program Files (x86)\cwRsync\bin\rsync.exe" -a  -e "'C:\Program Files (x86)\cwRsync\bin\ssh.exe' -v -i /cygdrive/C/temp" "XXXX@XXXXXXX:/backup" "/cygdrive/E/" 

 

itefix
Offline
Last seen: 55 min 35 sec ago
Joined: 01.05.2008 - 21:33
The problem can be the -a

The problem can be the -a option:

-a, --archiveThis is equivalent to -rlptgoD. It is a quick way of saying you want recursion and want to preserve almost everything

You can replace it by -rlt as options p (preserve permissions), g (preserve groups), o (preserve owner) and D (preserve D) are not relevant in Cwrsync.

danlee
Offline
Last seen: 8 years 8 months ago
Joined: 26.04.2012 - 03:10
Thanks, I was able to get

Thanks, I was able to get everything working with my final script :)

 

@ECHO OFF

REM Make environment variable changes local to this batch file

SETLOCAL

 

REM where to find rsync and related files

SET CWRSYNCHOME=C:\Program Files (x86)\cwRsync

 

REM Set HOME variable to your appdata directory. That makes sure that

REM ssh command creates known_hosts in a directory you have access.

SET HOME=C:\Users\Administrator.SERVER\AppData\Roaming

 

REM Make cwRsync home as a part of system PATH to find required DLLs

SET CWOLDPATH=%PATH%

SET PATH=%CWRSYNCHOME%\BIN;%PATH%

 

"C:\Program Files (x86)\cwRsync\bin\rsync.exe" --delete -rlt  -e "'C:\Program Files (x86)\cwRsync\bin\ssh.exe' -v -i /cygdrive/C/temp" "XXXX@XXXXXXX:/backup" "/cygdrive/E/"