Sync in linux

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
tiborv
Forum Newbie
Posts: 11
Joined: Wed May 11, 2005 1:11 am

Sync in linux

Post by tiborv »

Hello!

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

Thanks !
timvw
DevNet Master
Posts: 4897
Joined: Mon Jan 19, 2004 11:11 pm
Location: Leuven, Belgium

Post 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...)
siefkencp
Forum Commoner
Posts: 69
Joined: Thu Dec 16, 2004 8:50 am

Post 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
tiborv
Forum Newbie
Posts: 11
Joined: Wed May 11, 2005 1:11 am

I need the code :)

Post by tiborv »

Please if you can post the code. Thank you for help !

Nice greatings !
tiborv
Forum Newbie
Posts: 11
Joined: Wed May 11, 2005 1:11 am

Rsync !

Post 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 !
Post Reply