Options for copying log files to server where Weblog expert is lcoated

Avatar
  • updated
I saw this help for options on copying log files: http://www.weblogexpert.com/help/wlex...

I'm surprised they didn't mention robocopy or xcopy.. Has anyone used either of these robocopy or xcopy to copy from server to another server? Can someone provide examples?

Thanks,

Frankie
Avatar
Hans Hardeman
I use PHP script to rename and ftp the logfiles to a folder on the WLE server, running by a cron job on the webserver

Other options:
use smartsync pro to download the log files http://www.smartsync.com/
write script in PS to download and rename the log file
download http://www.ncftp.com/ncftp/doc/ncftpg...
start php script with wget or curl from WLE PC

run as script before WLE analyse

My php script for a directadmin shared hosting account

$logmap= "/home/user/domains/domain.tld/logs/";
$archiefmap="/home/user/domains/domain.tld/logarchive/";
$newfile= date("Ymd",time()-(24*60*60))."-domain.tld.gz";
foreach (glob($logmap."*.gz") as $filename) {
if (!copy($filename, 'ftp://ftpuser:ftppassword@ftpserver.tld/Logs/'.$newfile)) {
if (!copy($filename, $archiefmap.$newfile)) {
echo "failed to copy $filename ...";
}
}
}

Ps no support on the script