You are not logged in.

#1 2009-02-10 22:52:44

mikeasu
Member
Registered: 2007-06-24
Posts: 9

Archlinux file server for XP backup - suggestions?

Hello all,

Just got a computer cheap - P4 (single core), small HDD, 512mb memory.  I was thinking of making it a linux-only box (I currently have my primary computer running Win XP and Arch, each on their own drive) to use as a file server to back up some files from my Windows drive.  Basically, I want to pick a couple directories to completely backup, and pick and choose some individual files (outlook .pst files, etc).  I'd like to put arch to use this box for some things other than just a backup - BOINC-work, etc - as opposed to a specifically-backup distro.  Would rsync/samba be the best way to go here?  Going to try to set this thing up wireless too, store it in the laundry room and winVNC into it or something.

Thanks!

Mike

Offline

#2 2009-02-11 10:07:55

ckristi
Member
From: Bucharest, Romania
Registered: 2006-11-21
Posts: 225

Re: Archlinux file server for XP backup - suggestions?

Well, for a Windows backup network storage I would recommend Samba and an Arch Linux installed on a software RAID1.
You can read here more about installing Arch on RAID1 partitions: http://www.sevenl.net/blog/?p=231.


In love I believe and in Linux I trust

Offline

#3 2009-02-11 20:13:43

mikeasu
Member
Registered: 2007-06-24
Posts: 9

Re: Archlinux file server for XP backup - suggestions?

ckristi wrote:

Well, for a Windows backup network storage I would recommend Samba and an Arch Linux installed on a software RAID1.
You can read here more about installing Arch on RAID1 partitions: http://www.sevenl.net/blog/?p=231.

Excellent link, thanks!  I'll have to think about RAID - we'd need a 2nd drive, but would certainly be worthwhile!

Offline

#4 2009-02-11 22:12:17

fukawi2
Ex-Administratorino
From: .vic.au
Registered: 2007-09-28
Posts: 6,223
Website

Re: Archlinux file server for XP backup - suggestions?

Samba would be the way to go, then you can just setup a mapped network drive on your XP machine and copy from "My Documents" to that drive.

I actually do it the other way with my XP machine -- my Arch file server SMB mounts the XP machine, then does an rsync of all the data. I do it this way because the XP machine has my iTunes and other media (movie) files so rsync is much better for backups instead of copying everything all the time. since Windows doesn't have any form of rsync, I had to do it in a 'pull' configuration instead of 'push'.

Offline

#5 2009-02-11 23:13:19

mikeasu
Member
Registered: 2007-06-24
Posts: 9

Re: Archlinux file server for XP backup - suggestions?

fukawi2 wrote:

Samba would be the way to go, then you can just setup a mapped network drive on your XP machine and copy from "My Documents" to that drive.

I actually do it the other way with my XP machine -- my Arch file server SMB mounts the XP machine, then does an rsync of all the data. I do it this way because the XP machine has my iTunes and other media (movie) files so rsync is much better for backups instead of copying everything all the time. since Windows doesn't have any form of rsync, I had to do it in a 'pull' configuration instead of 'push'.

Your other way sounds more like what I'm looking to do - pull vs push.  I don't have all my stuff to backup in just "My Documents" - some of what I want to backup are entire folders (pics, vids), some are individual files (quicken backups, outlook .pst file).  Sounds like I can set up a job using rsyncto pull those files over to the linux box.

Offline

#6 2009-02-12 00:39:53

fukawi2
Ex-Administratorino
From: .vic.au
Registered: 2007-09-28
Posts: 6,223
Website

Re: Archlinux file server for XP backup - suggestions?

Here's a starting point for you then. The Windows computer isn't always on, so I just run this script manually when I remember to.

#!/bin/bash
### Script to backup Documents from AV-Editor to Central File Server

#
# Config Variables
#
SRC_DIR='/mnt/av-editor/'
DEST_DIR='/srv/BackupData/AV-Editor'

#
# Program Binaries used by this script
#
MOUNT='/bin/mount'
UMOUNT='/bin/umount'
RSYNC='/usr/bin/rsync'
WHOAMI='/usr/bin/whoami'
FIND='/usr/bin/find'
XARGS='/usr/bin/xargs'
RM='/bin/rm'
CHMOD='/bin/chmod'

#
# Need to be root user
#
MY_USER=`${WHOAMI}`
if [ "$MY_USER" != 'root' ] ; then
    echo 'EXIT; Your shipment of FAIL has arrived. Only root can do a proper backup.'
    exit 1
fi

#
# Cleanup Shitty Files
#
echo "Cleaning up dodgy files that we don't like..."
${FIND} ${SRC_DIR} -type f \( -name Desktop.ini -o -name Thumbs.db \) -exec ${RM} -fv {} \;

#
# Do the Backup
#
echo "Starting backup of AV-Editor..."
RSYNC_OPTS='-av --delete --exclude=av-editor/Downloads --exclude=*.tmp --exclude=*System\ Volume\ Information --exclude=*RECYCLER'
${MOUNT} ${SRC_DIR} && ${RSYNC} ${RSYNC_OPTS} ${SRC_DIR} ${DEST_DIR} ; ${UMOUNT} ${SRC_DIR}

#
# Fix Permissions (cuz Windows doesn't have POSIX perms!)
#
${FIND} ${DEST_DIR} -type d -exec ${CHMOD} 550 {} \;
${FIND} ${DEST_DIR} -type f -exec ${CHMOD} 440 {} \;

echo
echo "Backup complete"

exit 0

Last edited by fukawi2 (2009-02-12 00:40:49)

Offline

#7 2010-02-06 09:13:28

Ferreira
Member
Registered: 2010-02-06
Posts: 1

Re: Archlinux file server for XP backup - suggestions?

Don't use Samba. For some reason it doesn't work like you think it would. It must have to do with the options available in the file system. I tried it here myself and NFS worked just fine with rsync -aPE, samba didn't. Then I manually expanded -a to -rlptgoD and removed one arg at a time until it was just -r. Nothing worked. You might need to find another way.

Offline

#8 2010-02-06 10:15:46

jowilkin
Member
Registered: 2009-05-07
Posts: 243

Re: Archlinux file server for XP backup - suggestions?

Rsync is really nice, if you want snapshots from the XP machine instead of just one backup you can go with rsnapshot.  It is basically a wrapper around rsync that uses heavy linking to make the snapshots VERY cheap to produce and automates the whole thing: http://rsnapshot.org/

Last edited by jowilkin (2010-02-06 10:16:14)

Offline

#9 2010-02-06 20:38:34

firecat53
Member
From: Lake Stevens, WA, USA
Registered: 2007-05-14
Posts: 1,542
Website

Re: Archlinux file server for XP backup - suggestions?

I have been using samba and rsync successfully for several years to accomplish the pull configuration.  Then,being paranoid about our pictures, I then use rdiff-backup to sync my server to our webspace.

Good luck!
Scott

Offline

#10 2010-02-07 05:55:56

fukawi2
Ex-Administratorino
From: .vic.au
Registered: 2007-09-28
Posts: 6,223
Website

Re: Archlinux file server for XP backup - suggestions?

Ferreira wrote:

Don't use Samba. For some reason it doesn't work like you think it would. It must have to do with the options available in the file system. I tried it here myself and NFS worked just fine with rsync -aPE, samba didn't. Then I manually expanded -a to -rlptgoD and removed one arg at a time until it was just -r. Nothing worked. You might need to find another way.

How do we think it would work? And how doesn't it do that? And what does it have to do with rsync?

The script I posted has been working fine for me for ~2 years now...

Offline

#11 2010-02-10 03:02:19

Isola
Member
Registered: 2010-02-02
Posts: 99

Re: Archlinux file server for XP backup - suggestions?

fukawi2 wrote:
Ferreira wrote:

Don't use Samba. For some reason it doesn't work like you think it would. It must have to do with the options available in the file system. I tried it here myself and NFS worked just fine with rsync -aPE, samba didn't. Then I manually expanded -a to -rlptgoD and removed one arg at a time until it was just -r. Nothing worked. You might need to find another way.

How do we think it would work? And how doesn't it do that? And what does it have to do with rsync?

The script I posted has been working fine for me for ~2 years now...

I'm not quite sure what Ferreira means, or if this is related to it:

If I have directory X shared with samba on Linux, and then mount it on another machine running Linux, I wouldn't be able to see files containing the swedish letters "å", "ä", "ö".

If I have directory X shared with NFS on Linux, and then mount it on another machine running Linux, I would be able to see files containing those letters.

I havn't looked more into how to solve it, since I replaced samba with an FTP-server instead.

Offline

#12 2010-02-10 04:34:32

fukawi2
Ex-Administratorino
From: .vic.au
Registered: 2007-09-28
Posts: 6,223
Website

Re: Archlinux file server for XP backup - suggestions?

Isola wrote:

If I have directory X shared with samba on Linux, and then mount it on another machine running Linux, I wouldn't be able to see files containing the swedish letters "å", "ä", "ö".

If I have directory X shared with NFS on Linux, and then mount it on another machine running Linux, I would be able to see files containing those letters.

That sounds correct....  But there was no mention in the backup solution of using Samba as a server, or mounting Linux-to-Linux...

Offline

#13 2010-02-11 17:45:52

timm
Member
From: Wisconsin
Registered: 2004-02-25
Posts: 417

Re: Archlinux file server for XP backup - suggestions?

If you want a nice backup solution, you might want to look at bacula.  I took an old machine and put a couple old pata hard drives in it, installed arch and bacula, and not it's a dedicated backup server.  You don't need a lot of horsepower for backup.  Because it backs up to the hard drives, restores are very fast.  I back up both Windows and Linux machines.

It is a bit of a project to get set up correctly sometimes, but once it's up, you hardly have to look at it at all.  You could still use your machine for whatever else you want.

Offline

Board footer

Powered by FluxBB