Backup Procedures?

Posted on 2005-04-09
Last Modified: 2013-12-27
Hi All,

I just got an LTO backup tape device for my E450, previously I used to connect to another DLT backup driver on another Solaris machine using rhosts setting. Anyway, my boss wants me to take a full backup (ufsdump) first time, and then take incremental backups during the week for a test, then he wants me to restore something from the middle of the week.

Something new for me. Anyone know any helpfull documents? Any personal experiences? and how would you retrieve from the backup with an incremental backup being done?

Question by:kalmen
    LVL 10

    Accepted Solution

    - You physicaly connect your drive to your machine
    - You run devfsadm to have the system rescan your hardware
    - You check your /dev/rmt-Directory for newly created devices. There will be about 20 called i.e. 1,1n,1l,1ln and so on.
    - Then let's suppose you have three partitions: /,/usr and /export/home... and you want to backup all of them onto one tape... so you do the following:

    ufsdump 0vf /dev/rmt/1n /
    ufsdump 0vf /dev/rmt/1n /usr
    ufsdump 0vf /dev/rmt/1 /export/home

    Using device /dev/rmt/1n means no rewind after usage. on your last session you use /dev/rmt/1 which means rewind the tape

    During the week you do usfdump 1vf /dev/rmt/.... (same as before, but dumplevel 1) which does an incremental backup since last level 0, or you could use level1 on monday, level 2 on tuesday level3 on wednesday and so on... which would backup only the differences since last day.

    to restore you put the tape with the full backup and wind the tape to the correct possition, using mt-command. let's suppose you want to restore /export/home-partition, then you use

    mf -f /dev/rmt/1n fsf 2

    (which forwards the tape 2 sessions)

    and then

    ufsrestore rvf /dev/rmt/1 to restore the entire partition.

    for more details see manpages of ufsdump/ufsrestore... they explain it pretty well

    LVL 1

    Author Comment

    Very nice! Do you know how I could do consequent levels using a crontab?

    LVL 10

    Expert Comment

    well you put all the sessions into a shell-script and start the apropriate script at the apropriate day... let's say you put

    ufsdump 0vf /dev/rmt/1n /
    ufsdump 0vf /dev/rmt/1n /usr
    ufsdump 0vf /dev/rmt/1 /export/home

    into a script that starts at the weekend


    ufsdump 1vf /dev/rmt/1n /
    ufsdump 1vf /dev/rmt/1n /usr
    ufsdump 1vf /dev/rmt/1 /export/home

    into another script that starts during weekdays (in the evening)

    so in case of failure you need 2 tapes... the one of the weekend and the one from last night.


    you create 5 script, one with level 0, one with level 1, one with level 2 and so on.

    then you start level0-script at the weekend, level 1 script on monday evening, level 2 script on tuesday evening and so on.

    this  second version means that only the changes since last day are backed up during weekdays (as opposed to the solution above where everything since last weekend was backed up), which makes backup faster during the week, but in case of failure on a friday youwould need 5 tapes to restore everything (weekendtape and the ones from every evening)
    LVL 38

    Assisted Solution

    neteducation has pointed you to the right direction, for full system backup you need to
    check /etc/vfstab  to find out the  partitions you have, and then use ufsdump to the tape:


    if you have / /usr /var /export partitions, and the tape drive name is /dev/rmt/0n
    (replace it with your real divice name), you do:

      mt -f /dev/rmt/0 rewind

       $ for fs in / /usr /var /export ; do
         /usr/sbin/ufsdump 0cf /dev/rmt/0n $fs

       see http:Q_20273285.html for more details.

    You can alway put the commands in a script and use cron to run the script .

    LVL 1

    Author Comment

    Thanks to both of you.


    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Better Security Awareness With Threat Intelligence

    See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

    Introduction Regular patching is part of a system administrator's tasks. However, many patches require that the system be in single-user mode before they can be installed. A cluster patch in particular can take quite a while to apply if the machine…
    I promised to write further about my project, and here I am.  First, I needed to setup the Primary Server.  You can read how in this article: Setup FreeBSD Server with full HDD encryption (…
    Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
    Video by: Phil
    This video goes over how to configure and start a jail in FreeBSD.  This video is meant to supplement the article included with this course.

    779 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

    Need Help in Real-Time?

    Connect with top rated Experts

    15 Experts available now in Live!

    Get 1:1 Help Now