Unix/Linux Go Back    


SCO Santa Cruz Operation (SCO) was a software company based in Santa Cruz, California which was best known for selling three UNIX variants for Intel x86.

Backup of files using NFS a faster way

SCO


Tags
backup, nfs, rsync, solved

Closed    
 
Thread Tools Search this Thread Display Modes
    #8  
Old Unix and Linux 04-02-2016
trolley's Unix or Linux Image
trolley trolley is offline
Registered User
 
Join Date: Dec 2013
Last Activity: 28 March 2017, 10:15 AM EDT
Location: Medway, Massachusetts
Posts: 32
Thanks: 4
Thanked 1 Time in 1 Post
I have finished testing rsync and it works like a charm. As promised, below is the finished shell script.


Code:
#!/bin/sh
# *********************************************************************
# *
# * Script Name : sysbck
# *
# * Description : Performs system backup to a remote NSF share
# *
# *********************************************************************
# *   Copyright 2015-20xx by Trolley Computers
# *********************************************************************

# *********************************************************************
# *	V A R I A B L E S
# *********************************************************************

# *********************************************************************
# *	F U N C T I O N S
# *********************************************************************

# *********************************************************************
# *	E R R O R   H A N D L I N G
# *********************************************************************

# *********************************************************************
# *	M A I N   S C R I P T
# *********************************************************************

    echo ==============================
    date
    echo ==============================
#
# Mount Remote NSF Share
#
    echo ""
    echo "Mount Remote NSF Share"
    echo ""

    /etc/mount /mnt/provmed
    sleep 3

    df -v
    echo ""
    echo ""
#
# Backup Files
#
    echo ""
    echo "Backup Files..."
    echo ""

    /usr/local/bin/rsync -vruog --delete /u2/* /mnt/provmed/.

    echo ""
    echo ""
#
# Un-Mount Remote NSF Share
#
    cd
    echo ""
    echo "Un-Mount Remote NSF Share"
    echo ""

    /etc/umount /mnt/provmed

    echo ==============================
    date
    echo ==============================

# *********************************************************************
# *	E X I T   S C R I P T
# *********************************************************************

Sponsored Links
    #9  
Old Unix and Linux 04-21-2016
MadeInGermany MadeInGermany is online now Forum Advisor  
Registered User
 
Join Date: May 2012
Last Activity: 28 June 2017, 2:47 PM EDT
Location: Simplicity
Posts: 3,586
Thanks: 282
Thanked 1,191 Times in 1,077 Posts
Consider adding -p and -t options to also preserve permissions and time.
Or use rsync -auvH that will also preserve links and other special files (something that cp -rp cannot do).
-a means archive, see

Code:
man rsync

Sponsored Links
    #10  
Old Unix and Linux 04-21-2016
trolley's Unix or Linux Image
trolley trolley is offline
Registered User
 
Join Date: Dec 2013
Last Activity: 28 March 2017, 10:15 AM EDT
Location: Medway, Massachusetts
Posts: 32
Thanks: 4
Thanked 1 Time in 1 Post
I have added the -t and -p qualifiers to my script.

Thanks to all that responded.
Sponsored Links
Closed

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Linux More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
GTAR - new ways to faster backup - help required Bharath_79 AIX 8 06-10-2014 09:32 AM
GTAR - new ways for faster backup - help required Bharath_79 AIX 2 05-22-2014 02:17 AM
backup to NFS mount Redhat-Solaris Stin UNIX for Dummies Questions & Answers 9 05-15-2008 05:17 AM
Faster Concatenation of files tkbharani UNIX for Advanced & Expert Users 1 06-26-2007 10:45 AM
Backup system to NFS Appliance device sirhisss UNIX for Dummies Questions & Answers 10 09-03-2003 11:24 AM



All times are GMT -4. The time now is 03:16 PM.