Results 1 to 3 of 3

Thread: Archive to Tape

  1. #1

    Default Archive to Tape

    Is it possible to Archive data to Tape - say once a week.

    (I'm if possible without using a seperate box)

    If not is there a way to do a "Automated" via a Zip(filenane based on datetime ) archive to a Share??

  2. #2

    Default Dump to a file

    I use this bash script for creating archives automatically. It grabs the last latest backup created. DATADIR is the place you want the archives sent to. BackupPCDATADIR is where you Data Dir for Backuppc is. BackupPCBIN is the bin dir for Backuppc. Change the pbzip2 compression at the end to whatever you want to use if pbzip2 is not available (ex. gzip, bzip2).

    Brian

    ######################################
    # BackupPC Archive Script
    # Brian Smith - Bonnier Corporation
    ######################################
    #!/bin/bash

    DATADIR=/mnt/Buffalo/BackupPC/weekly-dumps
    BackupPCDATADIR=/opt/BackupPC/data/pc
    BackupPCBIN=/opt/BackupPC/bin

    # Uncomment to remove old backups
    #echo "Removing old backups....."
    #find $DATADIR/ -type f | while read foo; do
    # rm -fv $foo
    #done

    echo "Checking dump directories....."
    ls $BackupPCDATADIR | grep -v archive | while read foo; do
    mkdir $DATADIR/$foo 2>/dev/null
    chmod 777 $DATADIR/$foo 2>/dev/null
    done

    ls $BackupPCDATADIR | grep -v archive | while read host; do
    echo Dumping $host `date`........
    $BackupPCBIN/BackupPC_tarCreate -t -h $host -n -1 -s \* . > $DATADIR/$host/$host.`date +%Y%m%W`.tar
    pbzip2 -p7 $DATADIR/$host/$host.`date +%Y%m%W`.tar
    echo Done! `date`
    done
    exit 0

  3. #3

    Default RE: Archive to tape

    Just setup the script to run in cron, and set the datadir to you tape device. You would probably remove the pbzip line.

Posting Permissions

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