Welcome to the most active Linux Forum on the web.
Go Back > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Slackware This Forum is for the discussion of Slackware Linux.


  Search this Thread
Old 12-31-2009, 11:10 AM   #1
Registered: Mar 2006
Location: USA
Distribution: [Current: Ubuntu, Arch] | {Past: Vector, Deli, Mint, Wolvix, OpenSUSE, Slackware, Puppy}
Posts: 70

Rep: Reputation: 15
Question Automount external HDD over network with rsync or samba?

I want to backup files and folders to an external hard drive on a networked computer running Slackware 13.0. The external hard drive isn't always on or mounted, so how to make it available for backups in a way that won't glitch when the hard drive is off?

rsync sounds very convenient, but several computers on my network run Windows XP, so something more cross-platform would be great, such as Samba.

In a GUI, such as XFCE, the external HDD automounts by partition labels in Thunar file manager, but how can I get that result from a remote TUI or Windows XP?

This is /var/log/messages after mounting the drive in Thunar:
bash-3.1# tail /var/log/messages
Dec 31 07:46:58 tara kernel: pci 0000:01:00.0: PCI INT A -> Link[LNKA] -> GSI 11 (level, low) -> IRQ 11
Dec 31 07:46:58 tara kernel: [drm] Initialized r128 2.5.0 20030725 on minor 0
Dec 31 07:46:58 tara kernel: agpgart-intel 0000:00:00.0: AGP 2.0 bridge
Dec 31 07:46:58 tara kernel: agpgart-intel 0000:00:00.0: putting AGP V2 device into 1x mode
Dec 31 07:46:58 tara kernel: pci 0000:01:00.0: putting AGP V2 device into 1x mode
Dec 31 08:05:54 tara ntfs-3g[3487]: Version 2009.4.4 integrated FUSE 27 
Dec 31 08:05:54 tara ntfs-3g[3487]: Mounted /dev/sda3 (Read-Write, label "BACKUPS", NTFS 3.1) 
Dec 31 08:05:54 tara ntfs-3g[3487]: Cmdline options: rw,nosuid,nodev,uhelper=hal 
Dec 31 08:05:54 tara ntfs-3g[3487]: Mount options: rw,nosuid,nodev,uhelper=hal,silent,allow_other,nonempty,relatime,fsname=/dev/sda3,blkdev,blksize=4096 
Dec 31 08:05:54 tara hald: mounted /dev/sda3 on behalf of uid 1000
The external HDD doesn't have an entry in /etc/fstab.
Old 12-31-2009, 01:07 PM   #2
Registered: Dec 2005
Location: "The South Coast of Texas"
Distribution: Slackware64-current
Posts: 507
Blog Entries: 1

Rep: Reputation: Disabled
I can't help you with WinXP, but you might look at pmount for those cases when the device will not automount (& sometimes when it will).
Old 12-31-2009, 05:16 PM   #3
Senior Member
Registered: Oct 2005
Distribution: Slackware 14.1
Posts: 3,482

Rep: Reputation: 544Reputation: 544Reputation: 544Reputation: 544Reputation: 544Reputation: 544
I use an external disk for my backups. My office machine is my primary system that concerns me the most for backups and that is where I install the drive. I use a SATA drive and removable drive bay tray. A USB drive would accomplish the same thing.

I use rsnapshot as my backup foundation. Rsnapshot uses rsync. In my rsnapshot config files I have rsnapshot look for other computers on my home LAN. If the machines are available then files are backed up. If not, then rsnapshot notes this in the logs and performs a backup of those systems by copying the previous backup.

I use cron to run rsnapshot. I backup config files and user directories every three hours to a second drive installed in my office machine. The process is manual for my weekly backups, which requires that external drive. The system is not perfect because I don't have all of these machines powered on 24/7, but is good enough for me.

I don't have any physical Windows machines connected here 24/7, but I do have two older systems configured to run Windows in a dual boot manner. Primarily I run Windows in virtual machines, one of which being important enough to perform backups. I don't backup the physical Windows machines, but by using Samba, rsnapshot functions the same for my those machines as I just described.

For my virtual Windows machine, I perform a backup of important files to my local hard drive through Samba. The virtual Windows machine does not know any better and thinks the Samba mounted local file system is a local drive. When I perform my manual weekly backup with my external drive, those backup files get copied to the external drive because the backup files merely are part of the entire local drive file system.

If you want to learn more about this process and grab the scripts, then perhaps the following will help:

A Backup Strategy

Last edited by Woodsman; 12-31-2009 at 05:24 PM.
1 members found this post helpful.
Old 01-01-2010, 03:39 AM   #4
Senior Member
Registered: Oct 2003
Location: Melbourne
Distribution: Slackware-current
Posts: 4,603

Rep: Reputation: 1509Reputation: 1509Reputation: 1509Reputation: 1509Reputation: 1509Reputation: 1509Reputation: 1509Reputation: 1509Reputation: 1509Reputation: 1509Reputation: 1509
I have WindowsXP machines on a network with a server running Slackware 13 and an external usb drive.
The Windows directories to be be backed up are mounted as Samba shares on the server.
I then have a small script that is run as a cron job to perform the regularly scheduled backup.
This script just mounts the external usb drive, performs an rsync backup and the unmounts the external usb drive. The script is run as root so that mount.ntfs-3g can mount the external usb drive that is formatted with NTFS.
# Copy files in project directories
# to external usb harddrive
# Intended to be run as a cron job by root
mount  /mnt/extusbhd ; \
rsync -aub --backup-dir=/mnt/extusbhd/backuptemp <Samba mount> /mnt/extusbhd/Projects/ ; \
umount  /mnt/extusbhd
The above script could (and should!) be modified to test that the external drive IS mounted before proceeding with the backup. (Probably as simple as 'if $(mount /mnt/extusbhd); then' ).

I have an entry in /etc/fstab that uses 'UUID=xxx' to specify the external drive so that the device is always mounted at the same point in the file system.
# External usb harddrive for data backups writable by user with uid=1002
UUID=D86447246447052A /mnt/extusbhd ntfs-3g noauto,rw,uid=1002 0 0
You can get the UUID of your device by looking at the output of 'ls -l /dev/disk/by-uuid' when the external drive is plugged.

Last edited by allend; 01-01-2010 at 03:41 AM.
Old 01-09-2010, 12:27 PM   #5
Registered: Mar 2006
Location: USA
Distribution: [Current: Ubuntu, Arch] | {Past: Vector, Deli, Mint, Wolvix, OpenSUSE, Slackware, Puppy}
Posts: 70

Original Poster
Rep: Reputation: 15
Thanks! I'm not ready to setup a cron job for backups; I want to just have the tools available and configured to make occassional backups over the network viable. Looking over your suggestions still.


backup, network

Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
1.5 TB external HDD will not automount... IcoNyx Linux - Hardware 10 03-28-2009 02:25 AM
aa1 - How do I edit fstab to automount external ntfs-3g hdd? hegemoni Linux - Newbie 1 03-15-2009 09:52 AM
SAMBA server with external USB trying to use rsync over SSH Iatros Linux - Newbie 2 02-24-2009 12:59 PM
Accessing External HDD on XPPro via Network WWoody Linux - Networking 1 10-02-2007 06:35 PM
Samba and a External HDD tbuss Ubuntu 2 04-08-2007 08:00 AM > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 12:49 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration