develooper Front page | perl.macosx | Postings from January 2002

MacOSX-File-0.50.tar.gz uploaded to CPAN

From:
Dan Kogai
Date:
January 18, 2002 10:57
Subject:
MacOSX-File-0.50.tar.gz uploaded to CPAN
Message ID:
272A4644-0C45-11D6-B0A2-00039301D480@dan.co.jp
Folks,

   I just uploaded MacOSX-File-0.50.tar.gz to CPAN.  It now comes with 
psync, a very simple utility that does update copy.  With this, you can 
simply

sudo psync / /Volumes/backup

   to get the full backup of your boot volume while listening to iTunes 
and surfing the web and writing this very mail.  Utility like this was 
the very reason I wrote this module.

see also:  http://www.dan.co.jp/cases/macosx/backup-volume.html

Dan

----
PSYNC(1)       User Contributed Perl Documentation       PSYNC(1)

SYNOPSIS
         psync [-n][-q|-vI<n>] source_items ... target_directory

DESCRIPTION
        psync does an update copy.  It compares source directory
        and target directory at first, then erases items that are
        nonexistent on source directory and finally copies every-
        thing on source directory.  Items items with the same mod-
        ification date and (data fork) size remain untouched, sav-
        ing time on operation.

        Currently psync supports options below

        -n  "Simulation mode".  It prints what it would do on
            standard output but does nothing thus far.

        -vn Sets verbose level.  Default verbose level is 1;  It
            prints only items that are changed.  Level 2 prints
            unchanged files also.  Level 3 and above are practi-
            cally debugging mode.

        -q  Quiet mode.  Sets verbose level to 0.

EXAMPLE
        To backup everything in startup volume, all you have to
        say is

          sudo psync / /Volumes/I<backup>

        And the resulting backup volume is fully-bootable copy
        thereof.  Note "sudo" or root privilege is necessary to
        restore file ownership.

PERFORMANCE
        On PowerBook G3 (pismo) with G3/400, 384MB Memory,  I
        tested with "/usr/bin/time -l sudo psync / /Vol-
        umes/backup".  The boot volume contains no more than
        vanilla OS X 10.1.2 and Developer kit.  It had a little
        over 85000 items and 1.5 GB of used space.  Here is the
        result;

             1st run
             2539.48 real       121.97 user       290.78 sys
             Following run
              452.98 real        47.29 user        39.38 sys

        Note screensaver was on with some other background pro-
        grams.  I used this program happily with my PowerBook G4
        while I am surfing the web and listening to iTunes at the
        same time letting SETI@Home search for cosmic programmers
        :)  With MacOS X, background backup is no problem

BUGS
        Using this utility over network such as AFS and NFS don't
        work well because of file permissions.  There are several
        ways to overcome this problem but for the time being it is
        not implemented.

        On the other hand this utility works very well on not only
        HFS+ but also UFS.  It even works with on disk images so
        backup over AFS is still possible in theory by making a
        huge disk image on an AFS volume.

DISCLAIMER
        The author of this utility will be held no responsibility
        for possible damages and losses of data and/or files
        caused by the use thereof.  Use me at your own risk.

AUTHOR
        Dan Kogai <dankogai@dan.co.jp>

SEE ALSO
        the 1 entry in the pcpmac manpage

        hfstar http://www.geocities.com/paulotex/tar/

        hfspax http://homepage.mac.com/howardoakley/

        "The Finder and File Operations"
        
http://developer.apple.com/techpubs/macosx/Essentials/SystemOverview/Find
er/The_Finder___Oper-
        ations.html

COPYRIGHT
        Copyright 2002 Dan Kogai <dankogai@dan.co.jp>

        This library is free software; you can redistribute it
        and/or modify it under the same terms as Perl itself.




nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About