| Backing up FreeBSD directories onto a WindowsNT Workstation - "Chris Silva"
<bitsurfr@enteract.com> I was faced with the problem of saving all the kewl things
I have done in certain directories but at the time, had only a DAT in my NTWS...
First - Lets assume you have a small network at home, like I do, and lets also assume
you have added a nice FBSD firewall to keep things safe... You will need to be able to FTP
into your NTWS (or Server).
So - with all that as a given, here is what I did:
I installed Peer Web Services on my NTWS, added a secure login account. Peer Web
Services for NTWS is just a 10 user version of IIS - I disabled the web service, along
with gopher. All I needed was the FTP abilities.
I created a script that tars certain directories on my FBSD box. I put this
script in /etc/periodic/daily/ and gave it a name: in this case, 990.backup-makeworld and
chmoded it with +x
After the tarring is complete, another within the same script, it logs into the NT box
and "bin" and "put" the tarball there where my DAT then at 7:00 AM,
calls up my ArcServe.
Notice, I add the tar routing to /etc/periodic/daily so that it run each night at 2:00
am - where the actual filename is based on the box name, and the current date, i.e.:
makeworld.'date +%m%d%y'.tgz
Which becomes: makeworld.101199.tgz
Yes - the permissions are kept, and putting it back is as easy as ftp'ing back into the
FBSD box.
This works well for me even though I have since put a DAT on my BSD box.
Below is the scripting I use...
#!/bin/sh -
#
# $Id: ntbackup.php,v 1.24 2007/08/27 16:34:47 dan Exp $
#
# To be placed as /etc/periodic/daily/990.backup-makeworld
# And chmod +x
echo ""
echo ====== `date`: Backing up /usr/home/bitsurfer on makeworld.com
cd /home/bitsurfer/backups
rm *.tgz
cd /usr/home
tar -zcvf makeworld.`date +%m%d%y`.tgz bitsurfer/
mv *.tgz /usr/home/bitsurfer/backups
echo ""
echo ====== `date`: Putting tarball to NTWS
cd /home/bitsurfer/backups
ftp -n -v 10.3.1.10 <<EoF
user (some user) (some password)
bin
prompt
mput *.tgz
[Ed. Note: 10.3.1.10 is the IP address of Chris' NT workstation]
Hope this helps...
Best regards, Chris |