LinuxQuestions.org
LinuxAnswers - the LQ Linux tutorial section.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices

Reply
 
LinkBack Search this Thread
Old 01-20-2005, 12:27 AM   #1
Hexane
LQ Newbie
 
Registered: Dec 2004
Posts: 27

Rep: Reputation: 15
Backup Solution


Right now I have a 20gb hard drive sitting around doing nothing. I decided that I would use this to back up my home directory. I was wondering if anyone knew a good way to do this. I want to have it back up anything to the 20gb that had been updated since the previous back up in the /home that was under 100mb. I was thinking like setting it up to do this at 4am or so if the computer is on.

Anyone know a good way or program to do this? or Will I have to write some crazy SH script? I am a java programer and have never written an sh script to do much more than download a few things with wget or compile some things.
 
Old 01-20-2005, 12:49 AM   #2
homey
Senior Member
 
Registered: Oct 2003
Posts: 3,057

Rep: Reputation: 56
I use rsync to backup my folders and after the initial run, all other runs just update things so it's very quick. For that reason, I don't even bother using cron for that.

You need to put a partition on the second drive and format it as ext3 for example:
mkfs.ext3 /dev/hdb1

mkdir /mnt/images
mount /dev/hdb1 /mnt/images -t ext3

Put an entry in the /etc/fstab so it's available every time you boot.
/dev/hdb1 /mnt/images vfat defaults 0 0
To make it writable for users with a group id of 500, edit the /etc/fstab file to include the following line /dev/hdb1 /mnt/win vfat gid=500,umask=002 0 0

Run the rysnc job, I usually run it a couple of times to make sure everything went ok.

rsync -av --delete-after /home/fred /mnt/images
 
Old 01-20-2005, 01:18 AM   #3
nnsg
Member
 
Registered: Apr 2004
Distribution: Slackware 9.1/10.1, Mandrake 9.1/10.1
Posts: 75

Rep: Reputation: 15
Try this:

http://www.rsnapshot.org/

You can control the snapshot interval and how many snapshots to keep, it will rotate the snapshots for you, very handly.
 
Old 01-20-2005, 01:20 AM   #4
Hexane
LQ Newbie
 
Registered: Dec 2004
Posts: 27

Original Poster
Rep: Reputation: 15
Would there be anyway to exclude files over 100mb with rsync? there is an exclude PATTERN but what is a pattern>?

Last edited by Hexane; 01-20-2005 at 01:21 AM.
 
Old 01-20-2005, 08:41 AM   #5
homey
Senior Member
 
Registered: Oct 2003
Posts: 3,057

Rep: Reputation: 56
You could create a list by using find or even putting the files into the list manually. May require some experimenting.
find /home/fred find -type f -name '*' -size +1000 -exec ls {} \; >list
rsync -av --exclude-from='list' /home/fred /mnt/images
 
Old 01-22-2005, 08:40 AM   #6
animehair
Member
 
Registered: Sep 2004
Location: NJ
Distribution: Gentoo
Posts: 104

Rep: Reputation: 15
A backup application

Mondo - this is what i use (and many others) to backup my server. By using CRON i can create backup schedules.
 
Old 01-23-2005, 04:26 AM   #7
bigrigdriver
LQ Addict
 
Registered: Jul 2002
Location: East Centra Illinois, USA
Distribution: Debian Squeeze
Posts: 5,691

Rep: Reputation: 286Reputation: 286Reputation: 286
You might also want to check out DAR. I searched for 4 years for a backup solution to do what I wanted; I found it with DAR.
 
  


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 On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
I need the best backup solution dtournas Linux - Software 1 10-16-2004 06:11 AM
Backup solution Dannydy Linux - Newbie 5 10-12-2004 02:22 AM
What is the best solution for backup? jml75 Linux - Hardware 2 07-25-2004 08:50 AM
Looking for a backup solution Seventh Linux - Software 2 04-27-2004 11:55 AM
Backup solution NSKL Linux - General 4 11-29-2002 06:12 AM


All times are GMT -5. The time now is 11:15 PM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration