Likes Likes:  0
Resultaten 1 tot 4 van de 4

Onderwerp: Tar Backup script

  1. #1
    Tar Backup script
    +32 3 7478056
    1.087 Berichten
    Ingeschreven
    24/05/05

    Locatie
    [BE] Aalst

    Post Thanks / Like
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    0 Berichten zijn liked


    Naam: Joeri B.
    Bedrijf: GlobalServe BVBA
    Functie: CEO / CTO
    URL: globalserve.be
    Ondernemingsnummer: 0875203878
    View be.linkedin.com/in/joeribeirens's profile on LinkedIn

    Thread Starter

    Tar Backup script

    Hoi,

    Zit met een volgend probleem.
    Ik draai een script, maar krijg altijd een rare fout, heb er mij al suf op gezocht, maar vind het probleem niet.

    Code:
    #!/bin/sh
    # full and incremental backup script
    # created 07 February 2000
    # Based on a script by Daniel O'Callaghan <danny@freebsd.org>
    # and modified by Gerhard Mourani <gmourani@videotron.ca>
    
    #Change the 5 variables below to fit your computer/backup
    
    COMPUTER=IP72                                   # name of this computer
    DIRECTORIES="/var"                              # directoris to backup
    BACKUPDIR=/backups                              # where to store the backups
    TIMEDIR=/backups/last-full                      # where to store time of full backup
    TAR=/bin/tar                                    # name and locaction of tar
    
    #You should not have to change anything below here
    
    PATH=/usr/local/bin:/usr/bin:/bin
    DOW=`date +%a`                          # Day of the week e.g. Mon
    DOM=`date +%d`                          # Date of the Month e.g. 27
    DM=`date +%d%b`                         # Date and Month e.g. 27Sep
    
    # On the 1st of the month a permanet full backup is made
    # Every Sunday a full backup is made - overwriting last Sundays backup
    # The rest of the time an incremental backup is made. Each incremental
    # backup overwrites last weeks incremental backup of the same name.
    #
    # if NEWER = "", then tar backs up all files in the directories
    # otherwise it backs up files newer than the NEWER date. NEWER
    # gets it date from the file written every Sunday.
    
    
    # Monthly full backup
    if [ $DOM = "01" ]; then
            NEWER=""
                    $TAR $NEWER -cf $BACKUPDIR/$COMPUTER-$DM.tar $DIRECTORIES
                    fi
    
                    # Weekly full backup
                    if [ $DOW = "Sun" ]; then
                            NEWER=""
                                    NOW=`date +%d-%b`
    
                                            # Update full backup date
                                                    echo $NOW > $TIMEDIR/$COMPUTER-full-date
                                                            $TAR $NEWER -cf $BACKUPDIR/$COMPUTER-$DOW.tar $DIRECTORIES
    
                                                            # Make incremental backup - overwrite last weeks
                                                            else
    
                                                                    # Get date of last full backup
                                                                            NEWER="--newer `cat $TIMEDIR/$COMPUTER-full-date`"
                                                                                    $TAR $NEWER -cf $BACKUPDIR/$COMPUTER-$DOW.tar $DIRECTORIES
                                                                                    fi
    Error output:
    Code:
    lws4:/backups# /etc/cron.daily/backup.cron 
    /bin/tar: Substituting -9223372036854775807 for unknown date format `-cf'
    /bin/tar: You must specify one of the `-Acdtrux' options
    Alvast bedankt voor het eens te bekijken.

  2. #2
    Tar Backup script
    geregistreerd gebruiker
    794 Berichten
    Ingeschreven
    18/04/08

    Locatie
    België

    Post Thanks / Like
    Mentioned
    3 Post(s)
    Tagged
    0 Thread(s)
    9 Berichten zijn liked


    Naam: Alain Van Messen
    Bedrijf: Evoluto
    Functie: Zaakvoerder
    URL: www.evoluto.be
    Ondernemingsnummer: 564814865
    View https://www.linkedin.com/company/evoluto's profile on LinkedIn

    Foutje heeft te maken met de "-cf" in deze regel :

    $TAR $NEWER -cf $BACKUPDIR/$COMPUTER-$DOW.tar $DIRECTORIES

    In die richting moet je zoeken ...

  3. #3
    Tar Backup script
    Geregistreerd Gebruiker
    4.755 Berichten
    Ingeschreven
    23/04/05

    Locatie
    Eindhoven

    Post Thanks / Like
    Mentioned
    15 Post(s)
    Tagged
    0 Thread(s)
    353 Berichten zijn liked


    Naam: Toin Bloo
    Bedrijf: Dommel Hosting
    URL: www.dommelhosting.nl
    ISPConnect: Lid
    KvK nummer: 17177247

    dit stuk geeft leeg terug
    Code:
    `cat $TIMEDIR/$COMPUTER-full-date`
    en dat komt omdat pas op zondag er iets in die file geschreven wordt

  4. #4
    Tar Backup script
    +32 3 7478056
    1.087 Berichten
    Ingeschreven
    24/05/05

    Locatie
    [BE] Aalst

    Post Thanks / Like
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    0 Berichten zijn liked


    Naam: Joeri B.
    Bedrijf: GlobalServe BVBA
    Functie: CEO / CTO
    URL: globalserve.be
    Ondernemingsnummer: 0875203878
    View be.linkedin.com/in/joeribeirens's profile on LinkedIn

    Thread Starter
    OK, lijkt te werken nu
    Heb even aangepast in script. Nu doet die wel de backup.

    Ik hou jullie op de hoogte

    Thx

Labels voor dit Bericht

Webhostingtalk.nl

Contact

  • Rokin 113-115
  • 1012 KP, Amsterdam
  • Nederland
  • Contact
© Copyright 2001-2026 Webhostingtalk.nl.
Web Statistics