[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

Making automatic backups of home directories to a rewritable DVD

Posted on 2005-04-26
7
Medium Priority
?
212 Views
Last Modified: 2013-12-15
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?
0
Comment
Question by:jclobocar
  • 3
  • 2
  • 2
7 Comments
 
LVL 12

Expert Comment

by:Dmitri Farafontov
ID: 13871529
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
 
LVL 2

Accepted Solution

by:
Darshan_Jadav earned 500 total points
ID: 13873663
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
 
LVL 1

Author Comment

by:jclobocar
ID: 13875100
Darshan,

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

0
Veeam and MySQL: How to Perform Backup & Recovery

MySQL and the MariaDB variant are among the most used databases in Linux environments, and many critical applications support their data on them. Watch this recorded webinar to find out how Veeam Backup & Replication allows you to get consistent backups of MySQL databases.

 
LVL 2

Expert Comment

by:Darshan_Jadav
ID: 13875176
Shd not take more then 10 mins to complete the script, provided u have sufficent HW to handle this...
0
 
LVL 1

Author Comment

by:jclobocar
ID: 13875241
where can I get the rpm for RedHat 9?
0
 
LVL 2

Expert Comment

by:Darshan_Jadav
ID: 13875336
0
 
LVL 12

Expert Comment

by:Dmitri Farafontov
ID: 14745032
You can get visit rpmfind.net for all possible RPM's
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Little introduction about CP: CP is a command on linux that use to copy files and folder from one location to another location. Example usage of CP as follow: cp /myfoder /pathto/destination/folder/ cp abc.tar.gz /pathto/destination/folder/ab…
Fine Tune your automatic Updates for Ubuntu / Debian
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.
Suggested Courses
Course of the Month17 days, 23 hours left to enroll

830 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question