Blog

Australian IT JOBS : Sydney IT jobs, UNIX jobs, Linux jobs, Java jobs, ASP jobs Linux.conf.au Linux.conf.au
Technology news and Jobs arrow Seeking Nerdvana arrow The Road to Ubuntu - Backup Salvation
The Road to Ubuntu - Backup Salvation PDF Print E-mail
Written by Adam Turner   
Monday, 05 November 2007
I kept trying to change the rights on particular folders, but I suspected the problem was with the way I was mounting the drive.

My troubleshooting was hampered by the fact that the mounted drive would regularly hang in the Nautilus file explorer, forcing me to reboot because I didn't know how else to deal with it. Using the IP address of the Maxtor network drive (192.168.0.3) rather than the name (hyperspace), improved things slightly.

On one reboot something went awry with gnome, it spurted out some kind of error. The Ubuntu appearance theme looked slightly different, but my network drive hanging problems were gone. Now that I had a suspect, I did a little digging and discovered if I disabled all the Nautilus file preview settings my problems went away. Even though they'd been set to "Local files only", I think they'd been treating the mounted network drive as a local drive and getting bogged down in trying to preview all those files.

With my stability issues resolved, it was time to deal with those permissions. A friend of Con's suggested a fstab entry using cifs rather than samba. For some reason it didn't work, but he'd used some interesting permissions parameters that I took onboard. Here's the fstab entry that finally fixed things for me;

//192.168.0.3/Public   /windows/Public smbfs username=xxx,password=xxx,dir_mode=0777,file_mode=0777 0 0

The key here seems to be "dir_mode=0777,file_mode=0777" - allowing me to read and write to any folder in the partition. I've used username and password, but I think guest would be fine as long as those permissions are correct.

With my stability and permissions issues sorted, it was time to start experimenting again. Like I said, I kept things simple with cp. I'm only backing up a handful of text files, so I don't need incremental backups, but I do want timestamps and automatic deletion of old backups after a set time.

I started with a script that looked something like;

# Source on mounted NTFS data partition
sou="/windows/data/Documents and Settings/Adam/My Documents/Adam/Work/AAA In Progress"


# Destination on mounted FAT32 network drive

des="/windows/Public/ubuntubackup"


# create new folder on network drive

mkdir ${des}/1


# copy source to new folder

cp "${sou}"/* ${des}/1


Note that "${sou}" is in quotes in the last line, to cope with the fact there's spaces in the path to my source folder.

This was a good starting point but, with a little more research, I managed to make it more useful. CONTINUED



 
< Prev   Next >

The Digital Lounge Room

Seeking Nerdvana - Attaining oneness with tech Subscribe to the RSS
Seeking Nerdvana follows Adam Turner's quest to attain oneness with technology. Embedded in the digital lounge room, Adam offers a view from the couch of the front line where PC converges with AV.
Contact , Register , Advertise with iTWire , Links , Register , About iTWire , Feedback , Post your jobs , Events , iTWire site map , Start Blogging
Industry Releases , Submit your release now , Start submitting to iTWire , How to post video