LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 10-11-2004, 03:10 PM   #1
Dannydy
LQ Newbie
 
Registered: Jul 2004
Posts: 26

Rep: Reputation: 15
Backup solution


Hello,

I have been building my sever, now it time for me to learn how to backup the drive Currently i have 2 scsi drive on the server and mount the second drive as /backup. I like to know what is the best method to back it up. And creating a script to with a cron job


Thankz
Dan
 
Old 10-11-2004, 03:54 PM   #2
darkleaf
Senior Member
 
Registered: Jun 2004
Location: the Netherlands
Distribution: debian SID
Posts: 2,170

Rep: Reputation: 45
I use tar to compress my home folder. I think it's the standard thing to run. I haven't looked at making it cron yet though. *watches thread closely
 
Old 10-11-2004, 03:57 PM   #3
m00t00
Member
 
Registered: Sep 2004
Distribution: Slackware 10, Gentoo
Posts: 292

Rep: Reputation: 30
tar -cjf backup.tar.bz2 /path/to/folder && mv backup.tar.bz2 /path/to/backup/storage

That could be souped up a whole lot IE putting the dates and etc on the backup archive, but thats the general idea.
 
Old 10-11-2004, 04:03 PM   #4
Dannydy
LQ Newbie
 
Registered: Jul 2004
Posts: 26

Original Poster
Rep: Reputation: 15
m00t00

In the begin of the command you place "/path/to/folder "
is that the folder that i want to copy. Can you place a sample for me to better understand it
 
Old 10-12-2004, 12:33 AM   #5
jordanGSU
Member
 
Registered: Sep 2004
Distribution: Debian, Slackware, Arch
Posts: 65

Rep: Reputation: 15
Hi, I've been experimenting with using tar for backup. One thing I picked up was that it does not preserve file permissions by default. To make it do this, create and restore as follows:
-p is what tells it to preserve permissions
create: tar -cvpzf backup.tar.gz /folder_to_backup
restore: tar -xvpzf backup.tar.gz

hope this helps
 
Old 10-12-2004, 03:22 AM   #6
TigerOC
Senior Member
 
Registered: Jan 2003
Location: Devon, UK
Distribution: Debian Etc/kernel 2.6.18-4K7
Posts: 2,380

Rep: Reputation: 49
For another angle I use rsync for backups. I backup my /home partition hourly. rsync is very clever in that it examines the origininal and the previous backup and finds out what has changed and then adds the files that have changed which makes the process very quick. The system I use is controlled via cron and sends a report to the log files. If you want to implement the same system install rsync. The script I use;

I made the following script (./backup) to backup the home partition and the output sent to a log file;
#!/bin/bash
##mount /dev/hda6 on /mnt
mount -t ext3 /dev/hda6 /mnt
##backup files to hda6
rsync --delete-after -avH /home/ /mnt/backup/home > /var/log/backup.log
##umount hda6
umount /dev/hda6

To make it executable do chmod 700 ./backup

to run it do ./backup

I put it in /etc/cron.hourly

The following entry was put in /etc/crontab so that a backup is made 10 min past each hour.

# m h dom mon dow user command
10 * * * * root /etc/cron.hourly/backup

I also use PartImage about once a month to do a mirror image of the drive to the same drive(hda6). PartImage is excellent and I run it off Knoppix.
Hope this gives a new angle.

Last edited by TigerOC; 10-12-2004 at 03:25 AM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Backup Solution Hexane Linux - General 6 01-23-2005 05:26 AM
I need the best backup solution dtournas Linux - Software 1 10-16-2004 07:11 AM
What is the best solution for backup? jml75 Linux - Hardware 2 07-25-2004 09:50 AM
Looking for a backup solution Seventh Linux - Software 2 04-27-2004 12:55 PM
Backup solution NSKL Linux - General 4 11-29-2002 07:12 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 06:17 PM.

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