Ask a Question related to PERL Beginners, Design and Development.

  1. #1

    Default Backup scheme

    Hi,

    I have a script that runs and zips a file, then copies it to another directory on another system.
    It also goes through and renames each file so that it keeps 14 files. The script I am using is just using system renames and I would like to truly do this in Perl.

    So I have started new.

    Heres what I have so far.....

    Snip
    Use File::Copy;
    Foreach $dfile (glob("c:/ned/ned/*back.zip")) {
    $numcount=substr($dfile,-11,3);
    ++$numcount;
    $ddfile = $numcount . substr($dfile,-8);
    copy("$dfile", "$ddfile") or warn;
    }

    I would like to increment each file as it gets a day older, then tuning the oldest file into a weekly file, the above does not work.

    Any ideas to get me on a BETTER path.

    Thankx

    Ned Cunningham
    POS Systems Development
    Monro Muffler Brake
    200 Holleder Parkway
    Rochester, NY 14615
    (585) 647-6400 ext. 310
    [email]ned.cunningham@monro.com[/email]
    Ned Cunningham Guest

  2. Similar Questions and Discussions

    1. authentication/login scheme
      I am a developer, not an administrator and want to ask you guys for advice on designing a login/authentication scheme for a new .Net C# product. ...
    2. The new allocation scheme and extensions
      In 1.6, when writing an extension which required Data_Wrap_Struct, the programmer would define the singleton method "new" to handle that. In 1.8,...
    3. Is this IPC scheme brain-dead?
      I'm designing an IPC scheme that I've never used before, and I need to vet it. I don't have any local resources to run it by, and would appreciate...
    4. Reasonable partition scheme
      I just bought a 120 GB HDD as a replacement. I now have a 20Gb Quantum Fireball with a fast access time and a 120GB Samsung with slower access time....
    5. loop - begin backup, end backup Oracle 8.1.7
      Hello, we have the problem named after: last weekend (22.12.2002), we did a reorganisation of a tablespace with the tool "sapdba" from SAP....
  3. #2

    Default Re: Backup scheme

    Ned,

    Here's a great script I use that is written in Perl. Might be a good
    starting point or might save you a ton of work.

    [url]http://freshmeat.net/redir/ibackup/44196/url_homepage/ibackup[/url]

    HTH,
    Kevin

    On Thu, 2004-01-22 at 12:18, Ned Cunningham wrote:
    > Hi,
    >
    > I have a script that runs and zips a file, then copies it to another directory on another system.
    > It also goes through and renames each file so that it keeps 14 files. The script I am using is just using system renames and I would like to truly do this in Perl.
    >
    > So I have started new.
    >
    > Heres what I have so far.....
    >
    > Snip
    > Use File::Copy;
    > Foreach $dfile (glob("c:/ned/ned/*back.zip")) {
    > $numcount=substr($dfile,-11,3);
    > ++$numcount;
    > $ddfile = $numcount . substr($dfile,-8);
    > copy("$dfile", "$ddfile") or warn;
    > }
    >
    > I would like to increment each file as it gets a day older, then tuning the oldest file into a weekly file, the above does not work.
    >
    > Any ideas to get me on a BETTER path.
    >
    > Thankx
    >
    > Ned Cunningham
    > POS Systems Development
    > Monro Muffler Brake
    > 200 Holleder Parkway
    > Rochester, NY 14615
    > (585) 647-6400 ext. 310
    [email]ned.cunningham@monro.com[/email]
    --
    Kevin Old <kold@kold.homelinux.com>

    Kevin Old Guest

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139