Sponsored Content
Full Discussion: Backup Strategies
Top Forums Shell Programming and Scripting Backup Strategies Post 25824 by Optimus_P on Tuesday 6th of August 2002 09:35:15 AM
Old 08-06-2002
if you read the man pages for your particular backup command they offer a common backup stratigy.

Personaly. I find it much easier to do a level 0 dump every night.

We are a 24/7 shop.

Code:
solaris backup script
$ cat /var/adm/scripts/backup.ksh
for i in / /home0 /home1 /home2 /home3 /home4; do
/usr/sbin/ufsdump 0uf /dev/rmt/0n $i
done

mt rewoffl

Code:
AIX backup script
$ cat /var/adm/scripts/backup.ksh
#! /bin/ksh
#
#       This script is intended to be used on AIX 4.3.3 and 4.3.2 ONLY.
#       This will use the backup utility doing a level 0 dump on any filesystem defined for $filesys and update /etc/dumpdates.
#       Arguments:
#               DEVICE = <backup device> rmt0 = rewinding rmt0.1 = non-rewinding
#               DUMPINFO = <file that will collect info to be emailed out>
#               MARK = <possition on the tape>
#

DEVICE="/dev/rmt0.1"
DUMPINFO=/tmp/dumpinfo
FILESYSTEMS="/ /usr /var /home"
MARK=1

echo > $DUMPINFO

for filesys in $FILESYSTEMS; do
        echo "Date: `date`
Filesystem: $filesys
Position: $MARK
Device: $DEVICE
        " >> $DUMPINFO
        /usr/sbin/backup -f $DEVICE -0 -u $filesys
        MARK=`expr ${MARK} + 1`
done
cat $DUMPINFO|mailx -s "Dumpinfo `hostname`" root
sleep 20
mt -f $DEVICE rewoffl

some files systems have been omited. but you get the gist.
 

7 More Discussions You Might Find Interesting

1. Solaris

questions about configuration & backup strategies

In our lab we are in the process of reevaluating the overall setup of our Sun workstations. I'd like to get the opinions of other system administrators on some general strategic questions: 1. If the goal is to try to guarantee identical functioning of all workstations within the lab, which... (1 Reply)
Discussion started by: eje4
1 Replies

2. UNIX for Dummies Questions & Answers

Check backup file size on backup tape

Hi, I performed backup on tape and I want to append more files to my previous backup on the same backup tape. But before I do that I need to know the backup file size of the first backup I performed so that I know the available size on the backup tape. Can someone help me what command I will use... (0 Replies)
Discussion started by: ayhanne
0 Replies

3. SCO

Backup to SCSI Tape Backup aborts

I am trying to make a full backup of my system using the cpio command. The Tape Unit is a SCSI DDS. The process started fine but after about 30 minutes, it just stopped and showed the following message: 1755 Signal 31 - Core dumped Any idea of what is causing this and how to fix it? ... (4 Replies)
Discussion started by: zionpc
4 Replies

4. UNIX for Advanced & Expert Users

backup a file and keep every version of the backup

I am trying to backup my .bash_history and I want to keep every version of the backup. I am thinking to put one of these in my crontab. 0 0 * * 0,3 cat .bash_history > boo 0 0 * * 0,3 cp .bash_history boo I would like the backups to be called boo1, boo2, boo3, etc. I would like to keep... (7 Replies)
Discussion started by: cokedude
7 Replies

5. Shell Programming and Scripting

rsync backup mode(--backup) Are there any options to remove backup folders on successful deployment?

Hi Everyone, we are running rsync with --backup mode, Are there any rsync options to remove backup folders on successful deployment? Thanks in adv. (0 Replies)
Discussion started by: MVEERA
0 Replies

6. Shell Programming and Scripting

Help with Backup Shell Script for Network Device Configuration backup

HI all, im new to shell scripting. need your guidence for my script. i wrote one script and is attached here Im explaining the requirement of script. AIM: Shell script to run automatically as per scheduled and backup few network devices configurations. Script will contain a set of commands... (4 Replies)
Discussion started by: saichand1985
4 Replies

7. Shell Programming and Scripting

[stdin / stdout] Strategies for redirecting outputs

Well.. let's say i need to write a pretty simple script. In my script i have 2 variables which can have value of 0 or 1. $VERBOSE $LOG I need to implement these cases: ($VERBOSE = 0 && $LOG = 0) => ONLY ERROR output (STDERR to console && STDOUT to /dev/null) ($VERBOSE = 1... (5 Replies)
Discussion started by: Marmz
5 Replies
All times are GMT -4. The time now is 08:21 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy