Page 1 of 1

Sync in linux

Posted: Wed May 11, 2005 1:14 am
by tiborv
Hello!

I have a problem.
How can i sync two folders in linux with php.

Thanks !

Posted: Wed May 11, 2005 10:25 am
by timvw
i've been using http://www.nongnu.org/duplicity/ for a while now, and still happy with it :)

(shouldn't be too hard to write your php wrapper for it... http://www.php.net/exec and friends...)

Posted: Wed May 11, 2005 1:18 pm
by siefkencp
2 ways I know of.

1 use php on the command line. Though if you have command line access, you may as well just do a Bash script for it it takes 3 seconds Ill post the code here if you need it. Both of these work best with Cron.

2 use a php website script but it means you have to visit the page to sync the directories. The code is not too hard in either php case but its more of a pain than doing the command line bash script.


Let me know what you prefer and Ill write you a little sample.

Chris

I need the code :)

Posted: Fri May 13, 2005 1:43 am
by tiborv
Please if you can post the code. Thank you for help !

Nice greatings !

Rsync !

Posted: Fri May 13, 2005 1:50 am
by tiborv
Yes i know about rsync.
I dident ask the right question :).
How to sync with php TWO folders in the same partiton in linux.

Internet page :
You have left frame which shows you dirs and docs in folder /ftp/test , and the right frame shows you /ftp/test2/test3, and all folders and docks have checkbox beside them, to check and sync (sync not working).

Thanks and sory for previous wrong question !

Nice greating !