• April 26, 2024, 08:54:12 AM
  • Welcome, Guest
Please login or register.

Login with username, password and session length
Advanced search  

News:

This Forum Beta is ONLY for registered owners of D-Link products in the USA for which we have created boards at this time.

Author Topic: DNS-320 Backup options?  (Read 22498 times)

RicRoller

  • Level 2 Member
  • **
  • Posts: 45
DNS-320 Backup options?
« on: December 19, 2012, 12:52:27 PM »

Just finished copying a bunch of stuff onto my DNS-320; now would be a good time to back it up...

Just wondering what my options are (seemingly somewhat limited):
(a) The DNS-320 has two disks in RAID0 - a single volume so local backup by copying from one volume to the other is not possible
(b) Although an attached USB disk is writable, the DNS-320 itself does not provide the means to copy stuff to it (not available as a target for a local backup or visible in web file server or AjaXplorer - known outstanding feature request)

So as far as I can tell I am left with backing up via the network...
(a) Just copy the files using a Windows PC (CIFS mapped drive) or a Linux PC (NFS or CIFS mount)
(b) Use remote backup (rsync) to a Linux PC (the last time I tried this it was very flakey and kept cr**ping out before it completed...).

Just curious if there is in fact a "local backup" method (using just the DNS-320 itself - and that does not involving copying everything over the network) that I have overlooked... If not I'll just resort to attaching a large eSATA drive to a Windows PC, start the file copying and go away for a couple of days  ;)

Regards,
Richard
Logged

ivan

  • Level 8 Member
  • ***
  • Posts: 1480
Re: DNS-320 Backup options?
« Reply #1 on: December 19, 2012, 03:32:36 PM »

Ric, if you look in the english manual page 80 you will find information on setting up the local backup facility.  You will need the network option because of your RAID setup.

Also as a note, keep your backups up to date because if one disk fails in a RAID 0 array you have lost everything.
Logged

RicRoller

  • Level 2 Member
  • **
  • Posts: 45
Re: DNS-320 Backup options?
« Reply #2 on: December 20, 2012, 02:48:24 AM »

if you look in the english manual page 80 you will find information on setting up the local backup facility
FYI, in the copy of the manual on my DNS-320 installation CD (manual version 2.10) the information (what little there is) about local backups is on page 90. Also, I noticed that the manual version I found on the D-Link site (UK snd US) is stale; a much older version 1.1 and shows the completely different and ancient web UI!

But, studying both the "local backup" and "remote backup" options documented in my CD manual and in my NAS web UI, regrettably they are useless for backing up the NAS onto an external USB drive.
(a) As you rightly point out (and I was already aware) the "Local backup" option only provides the facility to shunt stuff from one volume to the other (so requires two disks in "standard" configuration - Volume_1 and Volume_2)
(b) The LAN backup option only provides the facility to pull files/folders from a LAN PC and store on the NAS; the destination is always the local volume (the "direction" of the backup cannot be reversed)
(c) And a connected USB drive is never visible as a potential target of the backup  >:(

"Remote backup" isn't any better:
(a) "NAS to NAS" and "NAS to Linux" both appear to use "rsync" to do the work - so shunting stuff to a Windows PC is not possible (as far as I can tell the only difference between "NAS to NAS" and "NAS to Linux" is the authentication method ("NAS to NAS" is geared towards the remote backup server in the D-Link NAS)).
(b) I tried fooliing it by entering a local IP address as the destination; the loopback address 127.0.0.1 is rejected as invalid and if I enter the NAS own IP address that is also rejected ("please enter remote IP address")

So, it looks like I'm saddled with doing the backup from an external PC with the target drive connected to that PC - or I have to install fun plug and do the backup by issuing a 'cp -a' command in the shell (the shell would have acces to the local USB disk, why on earth wasn't USB disk access incorporated in the web UI too)?

Regards,
Richard
Logged

ivan

  • Level 8 Member
  • ***
  • Posts: 1480
Re: DNS-320 Backup options?
« Reply #3 on: December 20, 2012, 12:37:49 PM »

OK so my version of the manual is out of date sorry ;)

One thing you could do is enable the FTP server on the NAS and then use an FTP client on a PC to transfer the files directly to the USB disk or the disk in an hot swap caddy.

This is the method we use to transfer files to and from our various NAS and our server storage array.  We do this because it is much faster than using SAMBA over the network.
Logged

RicRoller

  • Level 2 Member
  • **
  • Posts: 45
Re: DNS-320 Backup options?
« Reply #4 on: December 20, 2012, 01:10:35 PM »

Thanks for the reply - but doesn't FTP have a 2GB file limit like the eeb file server (there are some video files and DVD ISO images to be backed up - all over 4GB)?

I ended up taking the simplest option; backed up using a Windows PC... connected eSATA drive (target for backup) to PC and simply copied folders from network share to the eSATA disk.

8 hours later it was finished (just under 1TB copied - glad I rolled the DNS-320 back from FW 2.03 to 2.02 - the aggregate data rate for the copy was over 30Mbyte/sec and for large video files it peaked at around 45Mbyte/sec  :) Gigabit LAN usage was 35% or more (did fluctuate a bit but that's most likely an artifact of the Windows task manager...).


BTW I noticed an intriguing "pipeline" effect; IMO something not optimal in the DNS-320's file reading - I will post the observations in a new thread.


Regards,
Richard
Logged

ivan

  • Level 8 Member
  • ***
  • Posts: 1480
Re: DNS-320 Backup options?
« Reply #5 on: December 22, 2012, 04:12:56 AM »

Richard, I'm glad you got your copy made.

Regarding the 2GB limit on FTP, I'm not sure that it still exists - at least with newer FTP server/clients.  We regularly move files of over 2GB - actually more like 7GB - by FTP on OS/2, and one of our clients that uses Linux can do the same.  Not sure about windows but I would have thought the newer versions could as well because the 2GB limit was a DOS thing.
Logged

RicRoller

  • Level 2 Member
  • **
  • Posts: 45
Re: DNS-320 Backup options?
« Reply #6 on: December 24, 2012, 05:54:51 AM »

I thought I read somewhere that the DNS-320 web file server and FTP server had a 2GB limit... AjaXplorer does appear to have an issue; saw some strange behaviour with large 2GB+ files (AjaXplorer thinks they are directories)!

I see from the spec/manual that the DNS-320L _does_ have local backup facility to USB disk, so maybe I'll look out for one of those in the January sales... I would certainly prefer to be able simply to connect a large USB disk, kick off the backup and just leave it going without needing intervention from a PC.

Regards,
Richard
Logged

ivan

  • Level 8 Member
  • ***
  • Posts: 1480
Re: DNS-320 Backup options?
« Reply #7 on: December 24, 2012, 02:34:40 PM »

Richard, if you have a spare large size hard disk looking for a home then the best thing you could do is get a cheap USB/SATA caddy and put the disk in that and use it foe your backups.

The only thing you would have to do with that is format the disk as NTFS using a windows machine.
Logged

RicRoller

  • Level 2 Member
  • **
  • Posts: 45
Re: DNS-320 Backup options?
« Reply #8 on: December 25, 2012, 02:10:31 AM »

If you have a spare large size hard disk looking for a home then the best thing you could do is get a cheap USB/SATA caddy and put the disk in that and use it foe your backups.
That is exactly what I did for the backup the other day - and was doing previously before trying to use the DNS-320.

The DNS-320 is more convenient fior sharing files between multiple PCs so would like to keep using it - but it would be nicer to be able to back up the DNS-320 itself to guard against hard disk failure without having to tie up one of the PCs for several hours.

Regards,
Richard
Logged

InspectorGadget171175

  • Level 1 Member
  • *
  • Posts: 5
Re: DNS-320 Backup options?
« Reply #9 on: February 26, 2013, 04:27:39 AM »

I'm with you on the lack of UI interface for a non-interactive backup to a USB drive.

I'm using RAID1, and wanted to backup my volume_1 to an external drive.

I ended up using "rsync" via "fun_plug".
I'd already put "fun_plug" on in order to install Twonky, so it was just a matter of connecting via SSH through Putty, running "rsync" to the USB mount and letting it run to completion.  

Command used:
Quote
   rsync -avh --del /mnt/HD/HD_a2/* /mnt/USB/HD_c1/ --progress

Using --del so any files I remove from Volume_1 will also be removed from the USB drive keeping both devices sync'd.

-----

Initially, the first backup took a long time because the USB drive was empty and had to copy everything over, plus the fact I had to do it via Putty on a client machine which needed to remain on. I didn't try "nohup" admittedly.

However, as it's a sync tool, subsequent backups (via the same command and to the same USB drive) will skip the files that already exist or are unchanged, and will only copy the newer/modified stuff so it will be much quicker.

You can do the backup in several stages instead of letting it run continuously, by issuing the command, letting it run for a few hours, killing it, and then running it again another day, as it will skip the files it already copied previously.

-----
I've now set rsync to run via "cron" (fun_plug and uwcron) every Monday morning at 9am, so it's like an incremental backup to the USB drive, and it will print the output to a log so I can check for any failures.

crontab entry (contained in /ffp/etc/cron.d/mondaybackup.cron) is:

Quote
0 9 * * 1  /mnt/HD/HD_a2/backup.sh

I'm no developer so it's not perfect, but my backup.sh script contains the rsync command amongst other things such as printing to a log:

Quote
#!/ffp/bin/sh
# Set log location
logfile=/mnt/HD/HD_a2/BACKUP.log
# Create a backup timestamp file onto USB disk
printf "This drive contains a backup of NAS Volume_1 taken at: `date +'%d %b %Y - %H : %M'`" > /mnt/USB/HD_c1/BACKUP.date
# Rsync command
/ffp/bin/rsync -avh --del /mnt/HD/HD_a2/* /mnt/USB/HD_c1/ --progress > $logfile
exit_code=$?
# Did it fail?
if [ $exit_code -ne 0 ] ; then
   # Print failure message to log and timestamp file
   printf "\nBackup failed\n" >> /mnt/USB/HD_c1/BACKUP.date
   printf "\nBackup failed\n" >> $logfile
else
   # Print success message to log and timestamp file
   printf "\nBackup completed successfully\n" >> /mnt/USB/HD_c1/BACKUP.date
   printf "\nBackup completed successfully\n" >> $logfile
fi

I also print the date and "success/failure" message to a timestamp file on the USB drive. This is in case I decide to switch USB drives for multiple copies.  At least with a timestamp file, I will be able identify when the backup was taken, and if it was successful or not.

If I want to check the progress of a backup while it's running, I can SSH to the NAS via Putty, and run:

Quote
tail -f /mnt/HD/HD_a2/BACKUP.log

UPDATE: I've since added msmtp command so it now emails me when the backup has started and again when it's finished. If the backup fails, the email also contains the last 50 lines of my backup log, so now it's all automated every Monday morning while I'm at work, and it notifies me when it's done and if it worked or not. 

This will suffice for me, at least until I have sufficient funds for a second NAS.
« Last Edit: February 28, 2013, 03:24:47 AM by InspectorGadget171175 »
Logged