nixCraft Linux Forum

nixCraft

Linux Tech Support Forum

Redhat rhel4 backup script using tar

This is a discussion on Redhat rhel4 backup script using tar within the Linux software forums, part of the Linux Getting Started category; How do I write a backup shell script using tar for RHEL 4 or RHEL 5 server? TIA...


Go Back   nixCraft Linux Forum > Linux Getting Started > Linux software

Register FAQ Members List Calendar Forgotten your password? Mark Forums Read
  #1 (permalink)  
Old 08-02-2007, 02:52 PM
raj raj is offline
Contributors
User
 
Join Date: Jun 2005
Location: Hyderabad
Posts: 151
Rep Power: 4
raj is on a distinguished road
Default Redhat rhel4 backup script using tar

How do I write a backup shell script using tar for RHEL 4 or RHEL 5 server?

TIA
__________________
Raj
Linux rulz.
I have never turned back in my life ; I shall not do so today.. haha
Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 08-02-2007, 11:15 PM
nixcraft's Avatar
Never say die
User
 
Join Date: Jan 2005
Location: BIOS
My distro: Ubuntu
Posts: 1,034
Rep Power: 10
nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute
Default

Your can write something as follows:
Code:
#!/bin/bash
DIRS="/home /var /data2"
NOW="$(date +"%d-%m-%Y)"
OUTPUT="/nas/backup.$NOW.tar.gz"
tar -zcvf $OUTPUT "$DIRS"
More info:
How to backup MySQL databases, web server files to a FTP server automatically

Howto Backup PostgreSQL Databases

Backup - Bash shell scripts directory
__________________
Vivek | My personal blog
Linux Evangelist
Play hard stay cool
Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads

Thread Thread Starter Forum Replies Last Post
FTP Backup script with cleanup of FTP arcadLemon Shell scripting 1 10-08-2007 01:32 AM
MySql FTP server backup script zafar466 Shell scripting 3 09-25-2007 06:43 PM
need help in writing backup script vishaltitre Shell scripting 4 05-23-2007 11:07 PM
MySQL Backup Script krisa Shell scripting 1 02-03-2007 12:57 AM
want a script keep backup of all users history. ricc Shell scripting 3 08-26-2005 01:30 AM


All times are GMT +5.5. The time now is 02:11 AM.


Powered by vBulletin® Version 3.7.4 - Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36