Sugath Mudali's Blog

October 22, 2010

Backup files on LaCie Network Space using cron

Filed under: Networking — sugath @ 11:25 am

LaCie Network Space (Design by Neil Poulton) is a NAS device with 1 TB of space. A USB port on the front connects to another external USB hard drive or USB key. Shares on the NAS can be backed to an external disk using the Backup menu on the administration page. We will shortly see how to use this external USB drive to schedule back up files on the NAS.

Embedded into the unit is BusyBox (a lightweight linux) running 2.6.12.6-arm1 kernel. By default, the device runs a web server (Administration console), FTP server and few other services but not telnet or ssh. A quick port scan (e.g., nmap) will reveal the following ports:

80/tcp open http
139/tcp open netbios-ssn
445/tcp open microsoft-ds
548/tcp open afp

So, how to access the device to set up a cron job? In order to do that, we need to install a service such as telnet daemon. Get a root shell on a Lacie Network Space device without physically opening the device and Get Telnet Access explain in detail how to use the web server to install a telnet daemon (utelnetd) on the device. In particular, pay attention to step 8 of the first link as it’s important to remove cleanConf daemon or else you need to repeat steps again when the NAS is rebooted.

Do another quick port scan and this time you should have telnet available at port 23:

...
23/tcp open telnet
...

Once you are logged in, change the root password to prevent others from accessing the system as root (remember you are logged is as root with no password). The next step is to set up a cron job to copy files to an external USB drive. Luckily, BusyBox already has rsync command and you can use it to sync files. The following is an example to sync files every night at 11.30. You can enter it directly to crontab file by using crontab -e.

30 23 * * * rsync -a /home/openshare /home/usbdisksdb1 > /tmp/backup.log 2>&1

Substitute the usb mount path if necessary (check the output of mount command after attaching a USB device)

Commands such as wget, a handy tool to download files, is not part of the default installation. There are two approaches to getting a command/program to run on the system. The first approach is to download binaries and install them. The second approach (my preferred) is to install ipkg first and then use it to install other packages, similar to Debian’s dpkg. Look for “manual bootstrap” section in here on how to install ipkg. After installing ipkg, add /opt/bin to the PATH environment variable or else the post installation will fail with unable to find update-alternatives script. To install wget using ipkg:

/opt/bin/ipkg install wget

The above command will download the binaries and resolve dependencies. Similarly, if you are not comfortable with the default ash shell, you may replace it with zsh shell using ipkg.

9 Comments »

  1. How can we sync files from 1 external HDD to another external HDD with something in middle which can use rsync with data capcity >500GB ? Using a windows box in between is no help because windows does not have a reliable rsync equivalent. Is there a way?

    Comment by Sumit — April 8, 2011 @ 12:21 am

    • Sumit, did a Google with the text ‘windows rsync’ and it came up with links related to using rsync on windows. However, I can’t vouch for their reliability.

      regards

      Comment by sugath — April 12, 2011 @ 12:41 pm

  2. There are many sync softwares, comparison sheet is on :
    http://en.wikipedia.org/wiki/Comparison_of_file_synchronization_software

    Yet to try one.

    Comment by Sumit — May 16, 2011 @ 11:35 pm

  3. I have couple of USB drives (2*1 TB and 2*500GB).
    Is there a way to attach them in a Network Storage Tower and make them as network drives ?
    I was reading about this possibility but does not know which storage tower is recommended and how much space it will take.

    I just want a small setup with an option to make 1 TB disk redundant with another 1TB disk using rsyn or anyother sync software..

    Comment by Sumit Khapli — May 10, 2012 @ 6:06 am

  4. This specific article, “Backup files on LaCie Network Space using cron Sugath Mudali’s Blog” was remarkable. I am generating out a reproduce to show my associates. Thanks for the post,Torsten

    Comment by Eliza — February 20, 2013 @ 4:32 am

  5. I like it whenever people come together and share opinions.
    Great website, stick with it!

    Comment by Http://Bayerncom.Com/Index.Php?Do=/Blog/170505/Information-About-Pest-Control-Services/ — April 10, 2013 @ 4:02 am

  6. Hiya! Quick question that’s entirely off topic. Do you know how to make your site mobile friendly? My weblog looks weird when viewing from my iphone 4. I’m trying to find a theme or plugin that
    might be able to resolve this issue. If you have any suggestions,
    please share. Many thanks!

    Comment by premiumpress themes — April 17, 2013 @ 7:27 am

  7. Your way of telling the whole thing in this paragraph is in fact good, every one be capable of effortlessly be aware of it, Thanks a lot.

    Comment by Tracey — April 21, 2013 @ 11:25 pm


RSS feed for comments on this post. TrackBack URI

Leave a comment

Create a free website or blog at WordPress.com.