LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 02-13-2003, 10:46 AM   #1
jmarsh
Member
 
Registered: Dec 2002
Posts: 129

Rep: Reputation: 15
Lightbulb backing up samba


i have linux red hat 8.0 running on my server with samba 2.2.7a. i also have a tape device installed in the server. i would like to backup my samba shares to the tape device.

what is the best way to do this? and also what software would i need to do it? i am new to backing up so please give details if possible. thank you
 
Old 02-13-2003, 10:58 AM   #2
gauge73
Member
 
Registered: Jan 2003
Location: Dallas, TX
Distribution: Fedora Core 4
Posts: 420

Rep: Reputation: 30
I asked a similar question and the response I got was to use crond. I've peeked around and it appears to be a daemon that will run scheduled tasks. I haven't bothered setting it up myself yet, so I can't give you any more information than that.

However, I doubt you'll need more info, cuz if you just look around on the net, there's a bunch of info on it. Easily enough to set it up, I would guess.
 
Old 02-13-2003, 11:06 AM   #3
SlickWilly
Member
 
Registered: Dec 2002
Posts: 327

Rep: Reputation: 30
Depends on why you're backing up.

For Disaster recovery I use Mondo :

http://www.microwerks.net/~hugo/

For general backup there are any number of tools out there, but I use flexbackup :

http://flexbackup.sourceforge.net/

A quick search on freshmeat

http://freshmeat.net/search/?q=backu...ction=projects

reveals quite a number of solutions, which you might want to peruse through.

Slick.
 
Old 02-13-2003, 01:21 PM   #4
jmarsh
Member
 
Registered: Dec 2002
Posts: 129

Original Poster
Rep: Reputation: 15
hey slick can you give me an example of how you set up to do backups?

i want to backup one share directory, which will be about 10 to 15 gigs, to a tape device on my server. the tape device is located locally.\

i downloaded flexbackup and am trying to get it to work. thanks for your help
 
Old 02-13-2003, 01:25 PM   #5
jmarsh
Member
 
Registered: Dec 2002
Posts: 129

Original Poster
Rep: Reputation: 15
also slick,, can you schedule backups with flexbackup?

was thinking about doing a full backup once a week with incremental backups each night!!!!!
 
Old 02-13-2003, 02:33 PM   #6
SlickWilly
Member
 
Registered: Dec 2002
Posts: 327

Rep: Reputation: 30
Oky...

Um.. To do a full backup of your directory :

flexbackup -fs /directory

To erase the tape first *then* do a full backup :

flexbackup -erase -fs /directory

to do an incremental backup :

flexbackup -fs /directory -level <x>

Where x is a number corresponding to the number of the incremental. The way it works is that if you use incremental 1, then it'll backup any files that have changed since you did the full backup. Incremental 2 will backup any changed since incremental 1 and so on. From the README on the flexbackup page comes this :

2.1. Can you explain numeric dump levels?
Level 0 gets everything. For 1 or higher, files that have been changed since the last backup at a lower level are archived. For instance, if a level 2 backup was done on Monday, followed by a level 4 backup on Tuesday, a subsequent level 3 backup on Wednesday would contain all files modified or added since the level 2 (Monday) backup.

See also these sun docs for an example with some pictures.
http://docs.sun.com/db/doc/805-7228/6j6q7uf18?a=view



So, taking the example you provide below
Sunday - Full backup
Monday - Incremental
Tuesday - Incremental
.... etc etc

You would do :

Sunday:
flexbackup -erase -fs /downloads

monday
flexbackup -fs /downloads -level 1

tuesday
flexbackup -fs /downloads -level 2

wednesday
flexbackup -fs /downloads -level 3

etc..

I have a question for you though.

Your 10-15 gig directory. Can ONE tape hold that much?
If I recall correctly a DDS3 can hold um.. 8 gig?
I forget how much a DDS4 can hold, and if you have a DLT then you should be fine (35 gig DLT is what I have).

However, if your tape can't hold your *entire* directory then you'll have problems with flexbackup. You'll need to split your /directory into /directory/one and /directory/two and span them over different tapes..

Bit of a bummer, but that's a limitation of flexbackup.

As for how you'd do it automatically. You'd need to set the above commands up as cron jobs.

That's a whole 'nother subject and feel free to open a new topic on it when you're happy that the above works.

Slick.
 
Old 02-13-2003, 03:17 PM   #7
jmarsh
Member
 
Registered: Dec 2002
Posts: 129

Original Poster
Rep: Reputation: 15
i have a dlt installed in the server so the 10 to 15 gigs will not be a problem. i appreciate what you did.

i did a few backups with the flexbackup. seems rather easy and did a nice job of backing everything up. now i need to schedule it. i will start looking on the web about cron but anything you can offer would be great. thanks.
 
Old 02-13-2003, 03:39 PM   #8
SlickWilly
Member
 
Registered: Dec 2002
Posts: 327

Rep: Reputation: 30
Oky.. Cron.

Cron is a Unix/Linux program scheduler. It'll automatically execute commands on your server according to a schedule you specify.

The cron Table

The cron table has six fields. The first five fields are schedule time fields and the sixth is the command itself:

1. The minute of the hour the command shall execute.
2. The hour the command shall execute.
3. The day of the month the command shall execute.
4. The month the command shall execute.
5. The day of the week the command shall execute.
6. The command.

All six fields are on one line. There is one space between each field. Only field 6 may contain spaces within itself.

Here is an example of what a schedule might look like:

10 3 1 1 * /usr/bin/perl myperlscript.pl

Comments in the cron table, ignored by the server, are lines beginning with the # symbol.

Here are the first five fields and their allowed values:


Field Allowed Values
----- -------
Minute 0-59
Hour 0-23
Day of the Month 1-31
Month 1-12 (also 3-letter month abbr)
Day of the Week 0-7 (also 3-letter day of week abbr)

Each of the above values can also contain ranges, lists, and step values. If a field contains an asterisk (*), it tells cron to accept all allowed values.

To create a cron entry you 'edit' your cron table. Or :

crontab -e

Each user has their own cron table, so you need to be aware of who you are when you do this. In your case you'll need to be root.

You'll get a blank vi screen. When you're done editing here :wq will end your editing, and your cronjob will be saved in your crontab. Look in /var/spool/cron for crontabs - yours will be called root.

Your needs are :

sunday - full backup
monday - incremental
tuesday - incremental.

etc..

In this case Sunday is day 0, monday is day 1, tuesday day 2.. and we'll be using 'day of the week' as our varying item. We need to pick a time to do them, and I'm figuring 10pm is a good time. So, your crontab table will look like this :

0 20 * * 0 /bin/flexbackup -erase -fs /directory
0 20 * * 1 /bin/flexbackup -fs /directory - level 1
0 20 * * 2 /bin/flexbackup -fs /directory - level 2
0 20 * * 3 /bin/flexbackup -fs /directory - level 3

and so on, where /bin/flexbackup is where you put your flexbackup binary. Note... I'm not sure these days wether cron will inherit a PATH. It used to be not, I'm old-school and I always include the full path to my program. It's good practice just in case someone replaces a program with a nasty trojan on the path anyway.

Once you're done, crontab -l will list your entry.

And then you're set.

Definately read up on cron. Although, I admit, man cron is rather daunting at first.

Slick.
 
Old 02-13-2003, 03:45 PM   #9
jmarsh
Member
 
Registered: Dec 2002
Posts: 129

Original Poster
Rep: Reputation: 15
thanks, where can i get cron? i have been looking for it online.
 
Old 02-13-2003, 03:59 PM   #10
jmarsh
Member
 
Registered: Dec 2002
Posts: 129

Original Poster
Rep: Reputation: 15
ok i have cron, i typed in 0 20 * * 6 /usr/bin/flexbackup -fs /dir/dir :wg now if i exit out that will save it?
 
  


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
Backing up from Windows XP to Samba, SetShortName Error, NTFS problems? Wetzel Linux - Networking 5 01-02-2009 10:40 PM
is there something wrong with backing up to nfs or samba mounted drives? SerfurJ Linux - Networking 3 02-11-2004 10:36 AM
Backing up osx Linux - General 5 03-24-2003 02:09 PM
Backing up Cichlid Linux - General 1 12-16-2002 10:03 PM
backing up dilberim82 Linux - General 6 10-30-2001 09:46 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 10:10 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