Networking Forums

Networking Forums > Computer Networking > Linux Networking > Backup Windows Box on Linux Box via SMB?

Reply
Thread Tools Display Modes

Backup Windows Box on Linux Box via SMB?

 
 
Nomen Nescio
Guest
Posts: n/a

 
      12-04-2003, 12:50 AM
I've got an XP machine and a linux machine that are connected across a fast
ethernet network and TCP/IP + Samba.

I've got directories and files on the Windows machine I'd like to have
periodically "mirrored" on the Linux machine. Something along the lines of
a crontab job that would run like at 3AM. It'd be great if it would only
copy over the modified/changed/added files and not unchanged ones. This
way, if my Windows machines hard drives ever take a dump, or I screw
something up, I'll have copies of my important files on my Linux machine's
HD.

I'd like this to be implemented on the Linux machine, where the Linux
machine initiates the process/runs the command and talks to the Windows
machine, rather than running a "crontab" like job on the Windows machine
and perhaps emailing me if there were any problems. I want the process to
occur across samba/SMB, and not FTP or NFS.

I looked at the "smbtar" and the "smbclient" commands, and it looks like it
could be doable with those, but I'm wondering if there's a better way than
with those...

Is this easily doable?

If so, could someone point to a relevant FAQ or explain the steps in a way
that is easy to implement for someone who is not a UNIX guru.

 
Reply With Quote
 
 
 
 
Ambarish Sridharanarayanan
Guest
Posts: n/a

 
      12-04-2003, 06:52 AM
In article <(E-Mail Removed)>, Nomen Nescio wrote:
> I've got an XP machine and a linux machine that are connected across a fast
> ethernet network and TCP/IP + Samba.
>
> I've got directories and files on the Windows machine I'd like to have
> periodically "mirrored" on the Linux machine. Something along the lines of
> a crontab job that would run like at 3AM. It'd be great if it would only
> copy over the modified/changed/added files and not unchanged ones. This
> way, if my Windows machines hard drives ever take a dump, or I screw
> something up, I'll have copies of my important files on my Linux machine's
> HD.
>
> I'd like this to be implemented on the Linux machine, where the Linux
> machine initiates the process/runs the command and talks to the Windows
> machine, rather than running a "crontab" like job on the Windows machine
> and perhaps emailing me if there were any problems. I want the process to
> occur across samba/SMB, and not FTP or NFS.
>
> I looked at the "smbtar" and the "smbclient" commands, and it looks like it
> could be doable with those, but I'm wondering if there's a better way than
> with those...


Yes, use rsync (http://samba.anu.edu.au/rsync/)

> Is this easily doable?
>
> If so, could someone point to a relevant FAQ or explain the steps in a way
> that is easy to implement for someone who is not a UNIX guru.


I use a modifed version of the sample scripts at

http://rsync.samba.org/examples.html

There is an explanation of incremental backups as well as many ideas for
using rsync for backup at

http://www.mikerubel.org/computers/rsync_snapshots/

--
Ambarish
 
Reply With Quote
 
Fokke Sukke
Guest
Posts: n/a

 
      12-04-2003, 05:06 PM
"Nomen Nescio" <Use-Author-Supplied-Address-Header@[127.1]> schreef in
bericht news:(E-Mail Removed)...
> I've got an XP machine and a linux machine that are connected across a

fast
> ethernet network and TCP/IP + Samba.
>
> I've got directories and files on the Windows machine I'd like to have
> periodically "mirrored" on the Linux machine. Something along the lines

of
> a crontab job that would run like at 3AM. It'd be great if it would only
> copy over the modified/changed/added files and not unchanged ones. This
> way, if my Windows machines hard drives ever take a dump, or I screw
> something up, I'll have copies of my important files on my Linux machine's
> HD.
>
> I'd like this to be implemented on the Linux machine, where the Linux
> machine initiates the process/runs the command and talks to the Windows
> machine, rather than running a "crontab" like job on the Windows machine
> and perhaps emailing me if there were any problems. I want the process to
> occur across samba/SMB, and not FTP or NFS.
>
> I looked at the "smbtar" and the "smbclient" commands, and it looks like

it
> could be doable with those, but I'm wondering if there's a better way than
> with those...
>
> Is this easily doable?
>
> If so, could someone point to a relevant FAQ or explain the steps in a way
> that is easy to implement for someone who is not a UNIX guru.
>


In case rsync isn't what you want, then maybe something like arkeia backup
is something for you. It has a windows client which enables you to backup
stuff periodically to a tape or file.



 
Reply With Quote
 
Mattias Honrendgard
Guest
Posts: n/a

 
      12-04-2003, 06:47 PM
Nomen Nescio <Use-Author-Supplied-Address-Header@[127.1]> wrote in message news:<(E-Mail Removed)>. ..
> I've got an XP machine and a linux machine that are connected across a fast
> ethernet network and TCP/IP + Samba.
>
> I've got directories and files on the Windows machine I'd like to have
> periodically "mirrored" on the Linux machine. Something along the lines of
> a crontab job that would run like at 3AM. It'd be great if it would only
> copy over the modified/changed/added files and not unchanged ones. [snip]


You could mount the windows shares on your Linux box as normal, and
just write a small script to "cp" the files from the share to the
local drive?
 
Reply With Quote
 
Steve Wolfe
Guest
Posts: n/a

 
      12-05-2003, 08:36 AM
> > I've got directories and files on the Windows machine I'd like to have
> > periodically "mirrored" on the Linux machine. Something along the lines

of
> > a crontab job that would run like at 3AM. It'd be great if it would

only
> > copy over the modified/changed/added files and not unchanged ones.

[snip]
>
> You could mount the windows shares on your Linux box as normal, and
> just write a small script to "cp" the files from the share to the
> local drive?


Or even better, rsync'd: Even though you're using it to move files
between two file systems which are both mounted on the machine (IE, the
network transfer is still taking place over SMB), it would still be a good
idea, as it will intelligently decide just which files need to be
updated/moved. As network transfers are far slower than transfers to/from a
local disk, on the second and subsequent runs, it'll greatly speed things
up. It can be the difference between your backups taking a few minutes
compared to a few hours.

steve


 
Reply With Quote
 
Noi
Guest
Posts: n/a

 
      12-05-2003, 06:00 PM
On Thu, 04 Dec 2003 02:50:02 +0100, Nomen Nescio without thinking wrote:

> I've got an XP machine and a linux machine that are connected across a
> fast ethernet network and TCP/IP + Samba.
>
> I've got directories and files on the Windows machine I'd like to have
> periodically "mirrored" on the Linux machine. Something along the lines
> of a crontab job that would run like at 3AM. It'd be great if it would
> only copy over the modified/changed/added files and not unchanged ones.
> This way, if my Windows machines hard drives ever take a dump, or I screw
> something up, I'll have copies of my important files on my Linux machine's
> HD.
>
> I'd like this to be implemented on the Linux machine, where the Linux
> machine initiates the process/runs the command and talks to the Windows
> machine, rather than running a "crontab" like job on the Windows machine
> and perhaps emailing me if there were any problems. I want the process to
> occur across samba/SMB, and not FTP or NFS.
>
> I looked at the "smbtar" and the "smbclient" commands, and it looks like
> it could be doable with those, but I'm wondering if there's a better way
> than with those...
>
> Is this easily doable?
>
> If so, could someone point to a relevant FAQ or explain the steps in a way
> that is easy to implement for someone who is not a UNIX guru.


If a drive is mounted or mapped all the time. Then you could do it either
from Linux grabbing the Win files or from Win writing files to Linux.

I was using Window's Backup to backup Win2k files to a mapped
Linux drive weekly, incremental on every other week to the same
files on the mapped Linux drive. On the Linux box renamed the file
when I wanted a generation or two of backup.

If you smbmount the Win files you can make a list of files on the
smbmounted Win drive to backup then use tar to backup the files.

mount -t smbfs /win/shared /win/drive &&
find /win/drive/ -type f -depth -mtime +1 > tar_includes &&
tar -uf winbackup.$date2.tar -T tar_includes &&
# where $date2 is a date scheme
umount /win/drive &&
bzip2 -z winbackup.$date2.tar &




 
Reply With Quote
 
 
 
Reply

Thread Tools
Display Modes

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 On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Backup software for Linux? eric Linux Networking 4 11-14-2006 01:12 PM
Windows NT Backup jeffuk123 Windows Networking 1 09-27-2006 02:06 PM
Using Backup Routers With Windows XP and Windows 2003 Clients Will Windows Networking 2 09-18-2006 04:42 AM
Linux Based BAckup Server jtsnow Linux Networking 4 01-22-2005 06:07 AM
Good Windows -> Linux backup solution? Jem Berkes Linux Networking 2 06-25-2003 03:53 AM



1 2 3 4 5 6 7 8 9 10 11