Friday, September 30, 2011

New NAS to replace Dlink DNS-323

I've been using the Dlink DNS-323 NAS for quite a while now but I've been finding it too difficult to ensure its backed up correctly.  Tried tinkering with various "fun plugz" for backups to USB (and other cool features) but its never seemed stable or reliable enough.  Tried mounting the CIFS shares from Windows and never seemed to be able to find a good way of consistently backing it up in a reliable way.

The best way I found was mounting the CIFS share on a Linux box and then using incremental rsync to backup to a USB attached drive.  This worked but I don't usually have a Linux box just sitting around just for backup purposes.  Tried getting a Linux VM to automatically start on my Windows Media Center box, pass thru a USB hard drive to the VM, run a cronjob to launch rsync, and so on and so on.....

In the end its just harder than it needs to be and I'm feeling like its only a matter of time before I lose some data.

So it's time to search for a new NAS box.  Some features I'm looking for:
  • Scheduled (and ideally incremental) backup to local USB disk
  • Ideally the ability to encrypt the contents in case of theft

All I really need is a single bay device.  I don't plan to run RAID; just regular consistent backups is all I think I need at home these days.

I've heard good things about the QNAP devices.  They appear to support backup to local USB disk, however I couldn't see any scheduling or incremental backup features at first look.  Encryption also only looks like a feature on the mid-to-high end devices that have a Intel Atom CPU.

Then came across the Synology devices.  Backup to local USB disk with schedules appears to be supported.  They also talk about "Time Backup" which looks like an incremental type backup.  Encryption also looks like its supported even on the lower end devices.  On top of that, the standard OS (Disk Station Manager) which runs on all their devices looks pretty easy to use with a comprehensive feature set.

So in the end decided to go with:
  • Synology DS211j
  • 1x Seagate 2TB "Green" HDD (STL2000DL003, 5900RPM, 64MB Cache)

The DS211j is basically the entry level 2-bay device.  Went for this over the current 1-bay device as it has a faster CPU (DS211j @ 1.2Ghz vs DS110j @ 800Mhz, both 128MB RAM).  As won't be using RAID, thought this might give an advantage when encrypting data or doing some other more CPU intensive tasks.  Having 2-bays also give possibility of expansion in future or ease of data migration to a larger drive.  Thought briefly about going to the DS111 or DS211 (1.6Ghz/256GB) for extra CPU/RAM but didn't feel like it would be worth the money for me.

Anyway, will post my impressions soon...

Saturday, November 28, 2009

Static mount to Dlink DNS323 Samba Share

Here is the /etc/fstab entry that successfully mounts the Samba share from my Dlink DNS323.

This mounts the whole 'Volume_1' share under '/media/nas01'


//192.168.0.4/Volume_1  /media/nas01    cifs    username=user1,password=pass1,iocharset=utf8,file_mode=0777,dir_mode=0777 0 0

Friday, November 27, 2009

Archiving screenshot images with script

Often I take screenshots of the receipts from transactions that I complete online like paying bills or buying stuff. But I need some quick way of archiving these as they often just end up being called "Screenshot.png", "Screenshot-1.png", etc.

Here is a bash script that I hacked together from snippets I found on the net. This rename and move the files from one location to another. The new name will be a combination of the create time and the original file name.

#!/bin/bash

## Variables ##
orig_location="/home/user/Desktop"
orig_name="*.png"
new_location="/media/nas01/private/documents/records/screen_grabs"

## Script ##
# file all files in original location with original name and loop thru following...
find ${orig_location} -iname "${orig_name}" | while read FILE; do
 # Use 'stat' to extract the modification time
mtime=($(stat -c "%y" "${FILE}"))
 # get the name (without path) and convert to lower
NFILE=($(echo $(basename ${FILE}) | tr '[:upper:]' '[:lower:]'))
 # move the file to new location and prepend create time to filename
mv -f "${FILE}" "${new_location}/${mtime[0]//-/}_${NFILE}"
done

Tuesday, August 12, 2008

Vista auto-login

This one is easy to find in a Google search but will put here cause I found it useful.

1.  Start > Run > 'netplwiz' (ie Advanced User Accounts Menu)
2.  Uncheck 'User must enter a username and password to use this computer'
3.  Click OK/Apply to complete.

Monday, August 11, 2008

Scanning: HP PSC1315 scan straight to file

I have two printers connected to the NAS/Media Center box now.  The Canon iP4500 is the primary printer.  The HP PSC1315 is an older all-in-one printer/scanner that I've still got lying around; the printer part is pretty much stuffed but I still want to be able to use the scanner.

The scanner is just in the right spot to walk up and scan anything.  For documenting and record keeping and scanning like product receipts or bills, I'd like to be able to walk up to the HP, press the scan button and know that anything scanned will be saved to a file.  As the NAS/Media Center box is connected to the TV, I don't want to have to change the AV/Input to PC and click 'OK' to confirm my scan.

I have now set this up.  It wasn't too hard but some tricks were:
1.  Download the latest Vista drivers for the HP PSC1315.
2.  Install the "Everything" option and follow the instruction as prompted by the installer.  (I had to completely uninstall the HP software and reinstall in order to be able to make this work.)
3.  After all the rebooting required for a full install, open HP Solution Center and goto
  • Settings> Scan Settings> Button Settings> and then disable "Show Preview when scanning from the Scan button" and "Prompt for these settings at the time of the scan"
  • Set the default image options under Button Settings including the "Save to file Save Options...": disable the "Prompt for these Save Options at time of scan"
  • Settings> Scan Settings> Scan Preferences> and then disable "Prompt for additional scans from the glass/TMA"
4.  Now when you press the scan button on the printer, it will scan straight to a file without prompting.




Network printing: Mac OS 10.5 to Canon iP4500 on Vista SP1

Out of the box, Mac OS 10.5.4 could not print successfully to a Canon iP4500 shared out from a Windows Vista SP1 machine.

On the Macbook, when you goto add the printer and select a driver iP4500 was listed using the "Canon PIXMA iP4500 - CUPS + Gutenprint v5.1.3" driver.  All the setup of the printer goes fine until you print a page only to find it comes out blank!

This issue was described on forums such as http://discussions.apple.com/thread.jspa?messageID=6339055

This issue has been resolved in newer versions of the Gutenprint drivers: 5.2.0-beta3 fixed the issue for me.  To fix:

1.  Download latest .dmg file from gimp-print.sourceforge.net
2.  Install the drivers
3.  Install the printer and ensure that the latest Gutenprint driver is installed.

Friday, May 30, 2008

CrashPlan and Mapped Network Drives as SYSTEM User

The original thoughts behind the NAS system was to backup at all the important documents automatically offsite. I stumbled across a neat program called CrashPlan that allows you to automatically backup offsite to somebody you know for practically nothing.....very cool. (http://www.crashplan.com).

Anyway, got the demo installed and got my Dad to install it on his PC. I setup CrashPlan on my Vista machine to allow him to backup to my internal RAID5 array, easy. He was trying to setup CrashPlan on his WinXP machine to allow me to backup to his external Maxtor Shared Storage NAS drive (which he had mapped as a Z: or something)....Problem was that CrashPlan couldn't see the drive!

After a few emails to tech support, I found out that CrashPlan runs as the SYSTEM user and can't see Mapped Network Drives created by users.

To get around this, I had to figure out how to map a drive as the SYSTEM user. With the help of my friend the Internet, I was able to cobble the following together:

1. Run the following to schedule a command prompt session as the SYSTEM user at HH:mm
C:\> AT
(found here: http://shijaz.com/windows/Using_SYSTEM_user_context.htm)

2. Map the network drive using the 'net use' command.
C:\> net use Z: \\192.168.x.x\folder /PERSISTENT:YES
(more details here: http://www.cezeo.com/tips-and-tricks/net-use-command/)

UPDATED: This works well until the first reboot when the 'PERSISTENT' didn't work as well as I'd hoped. Looks like this is on hold till I can find a way to run a batch file as the SYSTEM user on startup.

UPDATED2: He gave up on the network drive idea and he's just going to use an external HDD to store my backups.