开发者

Auto Transfer of logs from server to server

开发者 https://www.devze.com 2023-01-06 17:23 出处:网络
I was wondering how to use php to do an auto transfer of log files weekly from one server to a cloud account.

I was wondering how to use php to do an auto transfer of log files weekly from one server to a cloud account.

I have all the passwords and what not, I am just confused on how to set this file up. As a site I am running stores log 开发者_运维百科files, we are trying to "push" them weekly to our cloud storage.

Any help would be appreciated.


Depending on your platform (Windows, *Nix), you would just want to use some scheduling system to invoke the PHP job either directly or via a local web call.

cron would be your *Nix tool of choice A scheduled task in windows would work there.

Outside of that, you'd just need to use PHP's file classes, specifically copy, and whatever code you'd need for your cloud provider.

EDIT: examples for RackSpace api

These guys have done basically exactly what you need. http://clloud.com/tutorials-and-tips/uploading-files-to-rackspace-cloud-using-php-aka-mosso/

I would build an upload script from that knowledge that does what you want. Then just use cron or scheduled task to invoke it on your schedule

0

精彩评论

暂无评论...
验证码 换一张
取 消