PDA

View Full Version : new to FreeBSD


Koodari
2004-11-21, 19:52
So, I'm looking to use my oldish PC as a server, first with monitor but later headless, and I have decided to go with FreeBSD for now. These are the types of jobs I have planned for it:

- public Samba sharing to my local network
- private Samba sharing to friends on local network
- web serving
- private filesharing to my Powerbook (dunno what is the best protocol / way for this)
- version control with CVS or Subversion
- eventually: automated backup from Powerbook

For resources I have the FreeBSD Handbook PDF from freebsd.org, and Unix Administration Handbook that covers FreeBSD among others. I have no experience admining Unix systems, but okay knowledge from userland.

First, I have 4.1 installed but have done nothing towards configuration. Should I format and install the new 5.3 production release before doing anything else?

Second, about the installation. What do you think about this quote from freebsd.org, "Use the mini ISO if Internet access is cheap for you. It will let you install FreeBSD, and you can then install third party packages by downloading them using the ports/packages system as necessary."?
With the 4.1 install, I used the full two ISO's, and sorta winged it with the packages I installed. If it seemed potentially useful, in it went. In hindsight it might be good for learning if I had to install all the packages prior to using them.

Third, what do you recommend for a way to use the PC hard drives' contents as transparently and reliably as possible from the Powerbook?

Fourth, is the backup good to do through the same route than filesharing?

Fifth, what would be the best place to go for help as a FreeBSD newbie, if there is something weird to troubleshoot and I couldn't find a fix from books / Google?

Wickers
2004-11-21, 22:37
First off...

http://www.bsdforums.org/forums/

For all your BSD questions that Google can not answer.

Now on to your post . . .

FreeBSD 5.3 has been made into the new stable release. So I would do a fresh start with it.

That said. . . I would use NFS for the connection between OSX and FreeBSD. But! since you are using samba for you other shares... why not keep everyone on the same page and use samba for your backups too.

After you mount the samba share, I would just use a bash script to back up directorys as needed. For example, you can make a directory in your home folder on the Powerbook. Keep all current work in the directory and anything else you please. Then run the script, which will mount the samba share, copy over the files to a directory named by the current date, and then unmount the share.

True easier said then done... but you can do a whole lot with bash if you take the time to learn it.

I guess you could also write an applescript to do the same... but I'm not sure how.

In any case... good luck, and happy man reading.

Wickers
2004-11-21, 23:16
Oh, I found this old bash script of mine. . . it might help you on the automated backup process.

Help as in show you how you can creat folders named after the current date.


#! /bin/bash
clear
# Copy dmesg to a file so I can review it later. . .

date=`date +%F`

mkdir $date

dmesg > $date/dmesg.txt

echo ================================================== ====
echo I just backed up your dmesg output in a text file. . .
echo You can find the text file in a directory named after
echo the date it was created.
echo ================================================== ====


The definition of simple yet it does it's job.

staph
2004-11-22, 02:32
If you're file-sharing to Macs only, you might want to look at Netatalk 2 (http://netatalk.sourceforge.net/), which now has full support for AFP3.3 (i.e. all versions of AFP/Appletalk file sharing up to and including Panther). Amongst other things, it preserves Mac OS resource forks and metadata, and can handle long Unicode file names.

Btw, since other people are posting backup code, here's what I used to backup my honours thesis work in the couple of weeks before it was due:


#!/usr/bin/perl -w
use strict;

# get some formatted dates to create sensibly organised folders

chomp(my $appenddate = `date "+%F@%H%M"`);
chomp(my $folderdate = `date "+%F"`);

# The root working directory for the files we'll be backing up

my $backuproot = "/Users/stephen/Documents/Historyhonours/";

# The target directory for the backup files to go into:

my $targetdir = "/Volumes/Apotheosis/TextFilesBackup/$folderdate";

# Create a directory each day to make things easier to organise:

unless (-e $targetdir) {
mkdir $targetdir or die "Cannot create target directory $targetdir: $!";
}

# change the working directory, to suppress the annoying absolute
# folder path errors, and lose all the extra folders between root and
# the first folder actually containing relevant information

chdir $backuproot or die "cannot chdir to $backuproot: $!";

# do the backup

system "tar -cjf $targetdir/textfilesbackup$appenddate.tar.bzip2 ./Chapters/*/*.mell ./Notes\\ on\\ books/* ./Books/Giles\\,\\ MP\\,\\ v1/*.rtf ./Books/Giles\\,\\ MP\\,\\ v1/*.txt ./Databases/Primary\\ source\\ material.fp7";

system "rsync -e ssh $targetdir/textfilesbackup$appenddate.tar.bzip2 stephen@192.168.1.12:~/"

nguyenhm16
2004-11-23, 08:14
The best resource for FreeBSD are the mailing lists. FreeBSD-questions is the general purpose user mailing list.