Hello!
I have a problem.
How can i sync two folders in linux with php.
Thanks !
Sync in linux
Moderator: General Moderators
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...)
(shouldn't be too hard to write your php wrapper for it... http://www.php.net/exec and friends...)
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
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 :)
Please if you can post the code. Thank you for help !
Nice greatings !
Nice greatings !
Rsync !
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 !
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 !