Making automatic backups of home directories to a rewritable DVD

I want to install a DVD burner to make backup copies of my home directories at 10:00 pm.
What do I need to erase and make automaticly Full and Incremental backup of data in those directories to DVD/CD media?
Is it safe?
LVL 1
jclobocarAsked:
Who is Participating?
 
Darshan_JadavCommented:
M using growisofs for crearting DVDs, edit the script as per your need and put in cron to execute at required time


#!/bin/bash
DATE=$(date +%Y-%m-%d)

#NOTE: These two paths must end in a / in
#order to correctly build up the other paths
BACKUP_DIR="/home/superman/"
TEMP_BACKUP_FILES_DIR="/backup/temp/"

BACKUP_FILE=$PATH"backup-"$DATE".tar"
DATABASE_FILE=$TEMP_BACKUP_FILES_DIR"foo-"$DATE".sql"

#These directories shouldn't end in a / although
#I don't think it will cause any problems if
#they do. There should be a space at the end though
#to ensure the database file gets concatenated correctly.
SOURCE="/a/location /other/locations " $DATABASE_FILE

echo Removing old backup directories
rm -rf $BACKUP_DIR
rm -rf $TEMP_BACKUP_FILES_DIR

echo Creating new backup directories
mkdir $BACKUP_DIR
mkdir $TEMP_BACKUP_FILES_DIR

echo Creating database backup
pg_dump -U username -f $DATABASE_FILE databaseName

echo Backing up $SOURCE to file $BACKUP_FILE
/bin/tar -cpf $BACKUP_FILE $SOURCE

#This is not necessary and possibly harmful for DVD+RW media
echo Quick blanking media
dvd+rw-format -blank /dev/hdc

echo Burning backup
growisofs -dvd-compat -Z /dev/hdc -r -J $BACKUP_FILE
0
 
Dmitri FarafontovLinux Systems AdminCommented:
You can use tar utility to make full backups. For icremental backups a timestamp usually is created. It shouldnt be that hard to accomplish
0
 
jclobocarAuthor Commented:
Darshan,

how much time does it take to do a 2GB backup?

0
Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

 
Darshan_JadavCommented:
Shd not take more then 10 mins to complete the script, provided u have sufficent HW to handle this...
0
 
jclobocarAuthor Commented:
where can I get the rpm for RedHat 9?
0
 
Darshan_JadavCommented:
0
 
Dmitri FarafontovLinux Systems AdminCommented:
You can get visit rpmfind.net for all possible RPM's
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.