jakeeboy has asked for the wisdom of the Perl Monks concerning the following question:
I have a need to sync an entire directory structure on my computer with my .Mac account so that I can have access to whereever I am. I've looked into CPAN and found the module File::DirSync which appears to be what I have in mind but it syncs two directories to appear to be exactly alike. It will clobber and overwrite the online directory if I make delete files in the original directory and I don't want to do that so I decided to write my own version. Here's what it will do:
Sync mode - new files will be uploaded. Newer versions of a file will be deleted on the iDisk and the newer version uploaded. Deleted files will not be touched on the iDisk. (Default mode)
Backup mode - new files will be uploaded. Newer versions will not replace but will be considered the newest copy, the iDisk file will be renamed with a version stamp. Deleted files will not be touched on the iDisk.
Mirror - this will mirror the original structure. Any file deleted will be deleted on iDisk. The iDisk directory will be backed up into a gzipped tarball. (Similar to File::DirSync)
My question, sorry for the length of this, is this. Since I'm creating a module for this for myself would I be duplicating someone else's effort? and should I upload this into CPAN when I'm done?
Right now, it's for a specific use with iDisk but I have plans to create this so that any Network location can be opened via WebDav/http/sftp/ftp. iDisk storage is the easiest for me since the OS X automatically syncs any changes to my local iDisk with the .Mac iDisk.
Just wanted to get a feel for what others think of this.
Thanks for your input.
UPDATE:
Thanks for all the input. I'm still wanting to roll my own. Personally, this is more for me than for others but it sounds like that a CPAN module is not needed. There are plenty of solutions.
For me I'm trying to exercise and enhance my Perl skills. I don't necessarily have the same job I had when I picked up Perl and I just want to continue learning and working with Perl.
Resource forks are not an issue I'm using OS X and rolling this out with the current patched Perl 5.8.7
Considered: astaines: Title change to Synchronising a directory between device
Unconsidered: g0n - Enough keep votes ( Keep: 11, Edit: 6, Reap: 0 )
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Recreating the wheel...
by tirwhan (Abbot) on Dec 19, 2005 at 18:22 UTC | |
Re: Recreating the wheel...
by pboin (Deacon) on Dec 19, 2005 at 19:18 UTC | |
by astaines (Curate) on Dec 19, 2005 at 22:17 UTC | |
by john_oshea (Priest) on Dec 19, 2005 at 23:21 UTC | |
by blm (Hermit) on Dec 20, 2005 at 04:58 UTC | |
Re: Recreating the wheel...
by tphyahoo (Vicar) on Dec 19, 2005 at 18:32 UTC |