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 )


In reply to Synchronizing a directory between devices by jakeeboy

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.