Página 1 de 2 12 ÚltimoÚltimo
+ Responder ao Tópico



  1. #1
    haas
    Estou procurando um software de backup com DVD, preciso que seja criado backup em multi-volume, qual seria o mais indicado?

  2. #2
    slice
    eu uso um script em shell bash para fazer backup multivolumes em cd das minhas maquinas, acho que a sintax não deve mudar muito em relação à gravação em dvd's...


    #!/bin/bash


    # Main Settings of Backup Script

    which="/usr/bin/which"
    cdrecord="`$which cdrecord`"
    tar="`$which tar`"
    touch="`$which touch`"

    # Drive for backup copy
    drive="/dev/hdc"
    # Size of Media
    cdsize="665600"
    # Speed for record CD
    speed="4"
    # Mount Point
    backup_dir="/tmp/backup"
    # Backup tmp dir for iso files
    backup_tmp_iso="/tmp/iso"
    # Section of cdrom
    track="`$cdrecord -msinfo dev=$drive 2> /dev/null | awk '{print $1}'`"
    #track="`$cdrecord -msinfo dev=$drive`"
    # Flag of compression tar file
    flag="-pczvf"
    # File extension of compression tar file
    ext="tar.gz"
    # Backup Daily including list
    daily_list="/etc/backup/daily.list"
    # Backup Full including list
    full_list="/etc/backup/full.list"
    # Backup LOG Dir
    log_dir="/var/log/backup"
    # Date of Backup
    date_name="`date +%d`"
    # Date of ISO
    date_iso="`date +%a`"
    # Date name of log
    date_log="`date +%d_%m_%Y`"
    # Today
    today="`date +%w`"

    main() {
    checkdir
    if [ $today = 0 ]; then
    backupfull
    isofull
    blank
    else
    backupdaily
    isodaily
    fi
    checksize
    burncd
    }
    backupfull() {
    # Make LOG file
    $touch $log_dir/backup$date_log.log
    # Remove old backups
    rm -f $backup_dir/*
    # Make tar compressed files from Backup List
    for BACKUP_FILE in `grep -v ^# $full_list`
    do
    BACKUP_NAME="$backup_dir/`date +%a`-`echo $BACKUP_FILE|sed s+\/++g`.$ext"
    rm -f $BACKUP_NAME
    $tar $flag $BACKUP_NAME --exclude /usr/src $BACKUP_FILE
    echo "$BACKUP_NAME" >> $log_dir/backup$date_name.log
    done
    }
    backupdaily() {
    # Make LOG file
    $touch $log_dir/backup$date_log.log
    # Remove old backups
    rm -f $backup_dir/*
    # Make tar compressed files from Backup List
    for BACKUP_FILE in `grep -v ^# $daily_list`
    do
    BACKUP_NAME="$backup_dir/`date +%a`-`echo $BACKUP_FILE|sed s+\/++g`.$ext"
    rm -f $BACKUP_NAME
    $tar $flag $BACKUP_NAME --exclude /usr/src $BACKUP_FILE
    echo "$BACKUP_NAME" >> $log_dir/backup$date_name.log
    done
    }
    isofull() {
    mkisofs -o $backup_tmp_iso/backup$date_iso.iso -JrT $backup_dir
    }

    isodaily() {
    # Remove old iso files
    rm -f $backup_tmp_iso/*
    if [ $today = 1 ]; then
    # Make iso image of Monday backup
    mkisofs -o $backup_tmp_iso/backup$date_iso.iso -JrT $backup_dir
    else
    # Make iso image of other daily backups
    mkisofs -o $backup_tmp_iso/backup$date_iso.iso -JrT -C $track -M $drive $backup_dir
    fi
    }
    checkdir() {
    # Check if exist backup_dir
    if [ -e $backup_tmp_iso ]; then
    echo "OK" > /dev/null
    else
    mkdir $backup_tmp_iso
    fi
    if [ -e $backup_dir ]; then
    echo "OK" > /dev/null
    else
    mkdir $backup_dir
    fi
    if [ -e $log_dir ]; then
    echo "OK" > /dev/null
    else
    mkdir $log_dir
    fi
    }
    checksize() {
    if [ `ls -s $backup_tmp_iso/backup$date_iso.iso | sed 's/[A-Z]//g' | awk '{print $1}'` -lt $cdsize ] ; then
    echo "OK"
    else
    echo "A imagem nao cabe no CD!!!"
    exit 0
    fi
    }
    burncd() {
    # Check first or others tracks
    $cdrecord dev=$drive -v speed=$speed -multi -data $backup_tmp_iso/backup$date_iso.iso
    eject $drive
    }
    blank() {
    $cdrecord dev=$drive -blank=fast
    }
    main



  3. #3
    karfax
    Amanda...

    []s,

  4. #4
    slice
    Hehehehe!!!!!

    Como a curiosidade matou o gato... Aproveitei uma promoção numa loja aqui em SJK e comprei um DVD+RW LG. Para minha surpresa, as coisas ficaram muito mais fáceis com o DVD...

    Veja como ficou a versão atualizada do script postado acima (CD+RW), para a utilização no drive de DVD...

    PS.: Não esqueça de criar os arquivos /etc/backup/daily.list e full.list, com os diretórios que serão incluídos no backup... tipo:

    #Diretorios de Backup
    /bin
    /boot
    /etc
    /home
    /root
    /usr
    #/win_xp
    #/debian
    /var



    #!/bin/bash

    # Main Settings of Backup Script
    which="/usr/bin/which"
    growisofs="`$which growisofs`"
    tar="`$which tar`"
    touch="`$which touch`"
    # Drive for backup copy
    drive="/dev/hdb"
    # Temp for Backup
    bkp_dir="/tmp/backup"
    # Flag of compression tar file
    flag="-pcjvf"
    # File extension of compressed tar file
    ext="tar.bz2"
    # Backup Daily including list
    daily_list="/etc/backup/daily.list"
    # Backup Full including list
    full_list="/etc/backup/full.list"
    # Date of Backup
    date_name="`date +%d`"
    # Today
    today="`date +%w`"

    main() {
    checkdir
    mkbkp
    burndvd
    }

    checkdir() {
    # Check if exist bkp_dir
    if [ -e $bkp_dir ]; then
    echo "OK" > /dev/null
    else
    mkdir $bkp_dir
    fi
    }

    mkbkp() {
    # Remove old backups
    rm -f $bkp_dir/*
    # Make tar compressed files from Full Backup List
    if [ $today = 0 ]; then
    list="$full_list"
    else
    list="$daily_list"
    fi

    # Make tar compressed files from Daily Backup List
    for BACKUP_FILE in `grep -v ^# $list`
    do
    BACKUP_NAME="$bkp_dir/`date +%a`-`echo $BACKUP_FILE|sed s+\/++g`.$ext"
    rm -f $BACKUP_NAME
    $tar $flag $BACKUP_NAME --exclude /usr/src $BACKUP_FILE
    done
    }

    burndvd() {
    # Check first or others tracks
    if [ $today = 0 ]; then
    $growisofs -Z $drive -R -J $bkp_dir
    else
    $growisofs -M $drive -R -J $bkp_dir
    fi
    }

    main



  5. cara ja tentou o mondo?? www.mondorescue.org


    falows






Tópicos Similares

  1. Software de backup - Tapeware
    Por andunno no fórum Servidores de Rede
    Respostas: 0
    Último Post: 07-12-2005, 08:28
  2. Software de Backup
    Por mirror no fórum Servidores de Rede
    Respostas: 2
    Último Post: 05-01-2005, 09:19
  3. Liberar acesso de software de banco
    Por gustavodoria no fórum Servidores de Rede
    Respostas: 1
    Último Post: 05-07-2004, 17:41
  4. Respostas: 2
    Último Post: 02-04-2003, 12:38
  5. Dificuldades em migração de softwares de Delphi para Kylix.
    Por Francisco no fórum Linguagens de Programação
    Respostas: 5
    Último Post: 14-11-2002, 08:42

Visite: BR-Linux ·  VivaOLinux ·  Dicas-L