[opensuse] synchronizing 2 folders
I need to synchronize the content of folders. Lets say I have 2 folders : - /home/hans/folder1 - /home/hans/folder2 Everytime I change something in folder1 like remove a file, create a file etc, folder2 will automatically be synchronized at once. how do i do that? -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
On Friday 22 June 2007 09:59, Hans Linux wrote:
I need to synchronize the content of folders. Lets say I have 2 folders :
- /home/hans/folder1 - /home/hans/folder2
Everytime I change something in folder1 like remove a file, create a file etc, folder2 will automatically be synchronized at once. how do i do that?
Hello Hans, It depends on what you really want to achieve by "synchronize". 1. If you just want to make an 'impression' that anything happens in folder1 will be 'synchronized' instantly to folder2, then you can mount --bind folder1 to folder2: mount --bind /home/hans/folder1 /home/hans/folder2 2. But if you want to provide a backup function too, so that if anything happens in folder1, there is a backup available in folder2, you can use rsync: rsync -a /home/hans/folder1 /home/hans/folder2 And put that command in crontab for to be running say.. 3 minutes. HTH, -- Fajar Priyanto | Reg'd Linux User #327841 | Linux tutorial http://linux2.arinet.org 12:53pm up 0:21, 2.6.18.2-34-default GNU/Linux Let's use OpenOffice. http://www.openoffice.org
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 The Friday 2007-06-22 at 12:53 +0700, Fajar Priyanto wrote:
2. But if you want to provide a backup function too, so that if anything happens in folder1, there is a backup available in folder2, you can use rsync: rsync -a /home/hans/folder1 /home/hans/folder2
And --del
And put that command in crontab for to be running say.. 3 minutes.
I wonder if there would be an easy way using 'famd' instead. - -- Cheers, Carlos E. R. -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.5 (GNU/Linux) Comment: Made with pgp4pine 1.76 iD8DBQFGe6QotTMYHG2NR9URAiOzAJwLyopL2gl4F3W8EQKSNIhgUZK5wACeOIUD hsoOs14UQ3xndfWpp2zS6wU= =T5fZ -----END PGP SIGNATURE----- -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
Carlos E. R. wrote:
And put that command in crontab for to be running say.. 3 minutes.
I wonder if there would be an easy way using 'famd' instead.
What's "famd"? -- Use OpenOffice.org <http://www.openoffice.org> -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 The Friday 2007-06-22 at 07:27 -0400, James Knott wrote:
Carlos E. R. wrote:
And put that command in crontab for to be running say.. 3 minutes.
I wonder if there would be an easy way using 'famd' instead.
What's "famd"?
RTFM ;-) Sorry, couldn't resist. O:-) ] DESCRIPTION ] ] FAM, the File Alteration Monitor, is a subsystem that applications ] can use to be notified when specific files or directories are changed. ] It is intended as a replacement for mechanisms such as poll and ] select. ] ] FAM comes in two parts: famd, the daemon that listens for requests ] and provides notifications, and libfam a library that client ] applications can use to communicate with FAM. For further information ] on libfam, see the fam(3) manual page. It is running on suse systems by default. - -- Cheers, Carlos E. R. -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.5 (GNU/Linux) Comment: Made with pgp4pine 1.76 iD8DBQFGe7adtTMYHG2NR9URApRYAJ9qDJIR/P1D+vpdVOy+9tgl8xM10gCeKTAd ZIuWrs2grZnz9CQPt2DPdyQ= =ef/N -----END PGP SIGNATURE----- -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
On Fri, 2007-06-22 at 13:46 +0200, Carlos E. R. wrote:
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
The Friday 2007-06-22 at 07:27 -0400, James Knott wrote:
Carlos E. R. wrote:
And put that command in crontab for to be running say.. 3 minutes.
I wonder if there would be an easy way using 'famd' instead.
What's "famd"?
RTFM ;-)
Sorry, couldn't resist. O:-)
] DESCRIPTION ] ] FAM, the File Alteration Monitor, is a subsystem that applications ] can use to be notified when specific files or directories are changed. ] It is intended as a replacement for mechanisms such as poll and ] select. ] ] FAM comes in two parts: famd, the daemon that listens for requests ] and provides notifications, and libfam a library that client ] applications can use to communicate with FAM. For further information ] on libfam, see the fam(3) manual page.
It is running on suse systems by default. Not on my OpenSUSE 10.2
I'd never heard of it before. I checked and found you man page. But no output from the command: ps -e | grep fam John O'Gorman
- -- Cheers, Carlos E. R. -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.5 (GNU/Linux) Comment: Made with pgp4pine 1.76
iD8DBQFGe7adtTMYHG2NR9URApRYAJ9qDJIR/P1D+vpdVOy+9tgl8xM10gCeKTAd ZIuWrs2grZnz9CQPt2DPdyQ= =ef/N -----END PGP SIGNATURE-----
-- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
On Fri, 2007-06-22 at 07:27 -0400, James Knott wrote:
Carlos E. R. wrote:
And put that command in crontab for to be running say.. 3 minutes.
I wonder if there would be an easy way using 'famd' instead.
What's "famd"?
File Access Monitoring Daemon? IIRC it's been discussed on the list a few times. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
Carlos E. R. wrote:
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
The Friday 2007-06-22 at 12:53 +0700, Fajar Priyanto wrote:
2. But if you want to provide a backup function too, so that if anything happens in folder1, there is a backup available in folder2, you can use rsync: rsync -a /home/hans/folder1 /home/hans/folder2
And --del
And put that command in crontab for to be running say.. 3 minutes.
I wonder if there would be an easy way using 'famd' instead.
Gee thanks, Carlos. Further investigation into this has added yet another "gotta work on this" mini-project to my list! Looks cool and a simple folder synchronizer should be reasonably easy to do. -- Jonathan Arnold (mailto:jdarnold@buddydog.org) Daemon Dancing in the Dark, an Open OS weblog: http://freebsd.amazingdev.com/blog/ UNIX is user-friendly. It's just a bit picky about who its friends are. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 The Saturday 2007-06-23 at 10:21 -0400, Jonathan Arnold wrote:
I wonder if there would be an easy way using 'famd' instead.
Gee thanks, Carlos. Further investigation into this has added yet another "gotta work on this" mini-project to my list! Looks cool and a simple folder synchronizer should be reasonably easy to do.
I'd be interested in knowing the result ;-) Kind of a cute daemon "a la cron" would be nice. You know, define a file with lines like: d|f path_to_dir_or_file_to_watch program_or_script_to_execute O:-) - -- Cheers, Carlos E. R. -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.5 (GNU/Linux) Comment: Made with pgp4pine 1.76 iD8DBQFGfTO0tTMYHG2NR9URAhyJAJ0TS9rZpvM6YkDcjt3vPY8gyCqJAQCeJQ/U PXUmCO9NESC95eFq0RhETCo= =XvOB -----END PGP SIGNATURE----- -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
"Hans" == Hans Linux <hans.linux@igi-alliance.com> writes:
Hans> I need to synchronize the content of folders. Lets say I have 2 folders : Hans> - /home/hans/folder1 Hans> - /home/hans/folder2 Hans> Everytime I change something in folder1 like remove a file, create a Hans> file etc, folder2 will automatically be synchronized at once. how do i Hans> do that? You could run the command rsync -auHv --delete /home/hans/folder1 /home/hans/folder2 every minute or so from a cronjob, or even continuously in a loop? ==John ffitch -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
Hans Linux wrote:
I need to synchronize the content of folders. Lets say I have 2 folders :
- /home/hans/folder1 - /home/hans/folder2
Everytime I change something in folder1 like remove a file, create a file etc, folder2 will automatically be synchronized at once. how do i do that?
You could create a link from one folder to the other. That way, you have one folder appearing as two. -- Use OpenOffice.org <http://www.openoffice.org> -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
Op vrijdag 22 juni 2007 04:59, schreef Hans Linux:
I need to synchronize the content of folders. Lets say I have 2 folders :
- /home/hans/folder1 - /home/hans/folder2
Everytime I change something in folder1 like remove a file, create a file etc, folder2 will automatically be synchronized at once. how do i do that?
Perhaps unison: http://www.cis.upenn.edu/~bcpierce/unison/ -- Richard Bos Without a home the journey is endless -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 The Sunday 2007-06-24 at 11:24 +0200, Richard Bos wrote:
Op vrijdag 22 juni 2007 04:59, schreef Hans Linux: ...
Everytime I change something in folder1 like remove a file, create a file etc, folder2 will automatically be synchronized at once. how do i do that?
Perhaps unison: http://www.cis.upenn.edu/~bcpierce/unison/
It comes with the distro. But it is not automatic, AFAIK. - -- Cheers, Carlos E. R. El 2007-06-24 a las 11:24 +0200, Richard Bos escribió: -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.5 (GNU/Linux) Comment: Made with pgp4pine 1.76 iD8DBQFGfj7ptTMYHG2NR9URAj9ZAJ9/8bGeYRtQAX0PLQWO9FVdgaq1bQCfSQEv L9iKmZrl6IilWWXAusc+gUI= =kJOU -----END PGP SIGNATURE-----
participants (9)
-
Carlos E. R.
-
Fajar Priyanto
-
Hans Linux
-
James Knott
-
John O'Gorman
-
Jonathan Arnold
-
jpff
-
Mike McMullin
-
Richard Bos