LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 04-01-2009, 11:41 PM   #1
Md.Abul Quashem
Member
 
Registered: Apr 2006
Location: bangladesh
Distribution: RedHat linux 9.0, Fedora core 5 and 6
Posts: 38

Rep: Reputation: 15
How can I backup..


HI all,

I've some script for backing up my linux server. I've two server one is limon
and other is poran.
the scripts are as follows
1st 0ne:

#!/bin/sh
# Individual clients mail allbackup script
# It will run every 1st date in each month at 00:05 AM
#
/bin/mkdir /mnt/usb/limon_bac/August29
#
/bin/tar -pzcvf /mnt/usb/limon_bac/August29/limon-etc-August30.tgz /etc/*
#
/bin/tar -pzcvf /mnt/usb/limon_bac/August29/limon-html-August30.tgz /usr/local/apache2/*
#
/bin/tar -pzcvf /mnt/usb/dhaka_bac/August29/limon-mysql-August30.tgz /usr/local/pgsql/data/*
#
/bin/tar -pzcvf /mnt/usb/limon_bac/August29/limon-root-August30.tgz /root/*

2nd one:

tar czvf /var/limon-backup.tar.gz /root/ /home/shabbir/ /etc /usr/local/apache2/ /var/spool/mail/ /var/named/ /usr/local/pgsql/data /usr/local/drikmail/

3rd one:

#!/bin/sh
echo -n "Start of daily backup at: " >> /var/log/backup.log
/bin/date >> /var/log/backup.log
/bin/mount -t nfs poran:/shared /mnt/poran
/usr/bin/find / -path '/mnt' -prune -o -print -depth -xdev |/root/scripts/filter
list > file.list
/bin/cat file.list|/bin/cpio -o --format=crc | /bin/gzip >/volume1/backup.limon.
cpio.gz
umask 066
su -c 'cp /volume1/backup.limon.cpio.gz /mnt/poran' nobody
#rm -f /volume1/backup.limon.cpio.gz
sleep 60
/bin/sync
sleep 60
echo -n "End of daily backup at: " >> /var/log/backup.log
/bin/date >> /var/log/backup.log
/bin/umount /mnt/poran

I know the above scripts are well but how can I backup..I dont understand!

I've an external HD for backup and mount it to my server...
Then what can I do for backing up both the server..
Please help me ...

I appreciate all of you...

Thanks in advance
Nabil
 
Old 04-02-2009, 01:02 AM   #2
routers
Member
 
Registered: Aug 2005
Location: Malaysia - KULMY / CNXTH
Distribution: Slackware, Fedora, FreeBSD, Sun O/S 5.10, CentOS
Posts: 787
Blog Entries: 6

Rep: Reputation: 75
ALL file scripts need to set executable with chmod 755
after that just ./script1 or whatever that file you named it .

if you dont want to use ./ for command then copy those file to /usr/bin
so next time just like this # script1 <- return

ps: edit the script to suite your backup destination

hope this help

cheers
 
Old 04-02-2009, 01:56 AM   #3
Md.Abul Quashem
Member
 
Registered: Apr 2006
Location: bangladesh
Distribution: RedHat linux 9.0, Fedora core 5 and 6
Posts: 38

Original Poster
Rep: Reputation: 15
question is that how can i backup both server to external hard drive?
 
Old 04-02-2009, 02:42 AM   #4
routers
Member
 
Registered: Aug 2005
Location: Malaysia - KULMY / CNXTH
Distribution: Slackware, Fedora, FreeBSD, Sun O/S 5.10, CentOS
Posts: 787
Blog Entries: 6

Rep: Reputation: 75
since you already mounted poran inside the limon server
then tar can be used ( i assume usb drive in limon)

use tar pzcvf /mnt/usb/poran.tar.gz /mnt/poran

this will straight put poran.tar.gz to inside your usb drive

or you can cd /mnt/usb/poran then tar pzvf poran.tar.gz /mnt/poran

both will put /mnt as parent folder in your backup

-------------
for local system (limon) you can use tar with --exclude mnt
 
Old 04-05-2009, 12:13 AM   #5
Md.Abul Quashem
Member
 
Registered: Apr 2006
Location: bangladesh
Distribution: RedHat linux 9.0, Fedora core 5 and 6
Posts: 38

Original Poster
Rep: Reputation: 15
thanks...
 
  


Reply



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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
how to create backup MYSQL Script to backup my database for every 1hour RMLinux Linux - Newbie 3 11-20-2008 10:13 AM
LXer: Automatic backup for sporadically connected clients with Box Backup LXer Syndicated Linux News 0 08-29-2008 08:40 PM
Backup system ala rdiff-backup, but without mirror and with dst encryption dr_dex Linux - Software 0 08-04-2008 03:39 AM
Using RSync to backup a secondary off-site backup server pezdspencer Linux - Software 4 06-29-2007 03:40 PM
Using rsync to backup data. Best way to backup folders? Micro420 Linux - General 2 11-23-2006 01:13 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 10:40 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration