D-Link Forums

The Graveyard - Products No Longer Supported => D-Link Storage => DNS-320L => Topic started by: fx1024 on March 21, 2016, 08:16:37 AM

Title: Is there an easy way to backup the DNS-320L?
Post by: fx1024 on March 21, 2016, 08:16:37 AM
I recently bought a DNS-320L to store my office data. I set it up with 2 x 4TB HDDs on RAID 1.
Along with the NAS I also bought a 4TB external HDD to make backups of the NAS for off-site safe keeping.

While every other aspect of the NAS installation worked fine. I just can't find a simple way to take backups directly from the NAS to the external HDD.

In the DNS-320L itself there is an application for local backups and another one for remote backups. Unfortunately each one has its own limitations making it useless. More specifically:

1. Remote backups.
It seems that it can be used only if you own another NAS with SSH and Rsync enabled, or another Linux machine in your network (also with SSH and Rsync enabled).

2. Local backups.
The LAN Backup option allows network shares to be backed up into the NAS but no the other way around.
The USB backup simply doesn' t work, at least for me. I formated the external HDD as NTFS, as EXT4 but nothing happened. The 320L displayed the HDD's info but showed a blank window when I tried to select a destination folder. I even tried to connect a FAT32 USB pendrive with the same results.

Is anybody here has any idea of how to take backups of this thing without using a PC as the intermediate?
Title: Re: Is there an easy way to backup the DNS-320L?
Post by: Manul on March 22, 2016, 09:49:58 AM
On which firmware version are you? I do incremental backups from my DNS320L to an external USB disk with a simple self-written script running on the NAS itself. You'll need ssh access to the NAS for that, though. I'm using fun_plug, but I read that's disabled in current firmware versions.
Title: Re: Is there an easy way to backup the DNS-320L?
Post by: fx1024 on March 23, 2016, 01:13:02 AM
On which firmware version are you? I do incremental backups from my DNS320L to an external USB disk with a simple self-written script running on the NAS itself. You'll need ssh access to the NAS for that, though. I'm using fun_plug, but I read that's disabled in current firmware versions.

Manul thank you for your reply. If I remember right my DNS320L had the 1.06b03 installed when I bought it and after a notification I updated it to 1.07. I thnik that I read somewhere that fun_plug was disabled in 1.06.
Title: Re: Is there an easy way to backup the DNS-320L?
Post by: Manul on March 23, 2016, 04:30:19 AM
I think 1.07 offers ssh access as a new feature - at least there's a thread here somewhere by people who can't get it to work. ;) If you manage to get that running, there might be a possibility to still go the scripted way...

I'm afraid I can't help you much with the builtin backup functions since I don't use them. I seem to remember though that my external (ext4 formatted) drive showed up as a potential backup destination in the USB backup setup page - I can test that at the beginning of April if you're still interested by then (drive is my off-site backup and hence currently, well, off-site).
Title: Re: Is there an easy way to backup the DNS-320L?
Post by: fx1024 on March 24, 2016, 02:03:05 AM
@Manul you are very helpful. Between other tests I formated the external drive as EXT4. The HDD info appeared at USB Storage Information. I had the opportunity to select a destination folder (if I remember right) but the local backup function (NAS->USB) didn't work and gave me an error. Using the EXT4 formated drive was the closest I've got so far to take a back up using the USB port. The interesting thing here is that the EXT4 is not officially supported as external storage format. Only FAT32 and NTFS is mentioned in the official documentation.

Regarding the SSH I haven't find any way yet to activate it. When I'm trying to connect I get a "Connection refused" and there is no relative setting in the DNS320L settings.
Title: Re: Is there an easy way to backup the DNS-320L?
Post by: Manul on March 24, 2016, 05:04:28 AM
There's a post in the other thread I mentioned (http://forums.dlink.com/index.php?topic=64443.msg267378#msg267378) by someone who managed to get ssh access to work - maybe they can tell you where/how to activate it. I'm still on firmware 1.04, so I'm afraid I can't help you there.

I'm a bit astonished that very few people seem to actually use the backup to USB functionality - seems like an essential function to me.
Title: Re: Is there an easy way to backup the DNS-320L?
Post by: fx1024 on March 24, 2016, 05:38:12 AM
@Manul I'll follow the instructions and try to enable SSH access. Is it possible to send me the script you mentioned?
Title: Re: Is there an easy way to backup the DNS-320L?
Post by: ivan on March 24, 2016, 05:59:43 AM
One comment here regarding the format of the USB connected drive.

If the external USB drive announces itself as a mass storage device (MSD) the actual format of the drive does not matter because the writing of the data is handled by the USB to SATA converter chip.  The NAS just sends raw data to the USB port (this is just the same as a computer sending data from a NTFS formatted drive to the NAS, assuming a windows OS).

It is only if your USB drive does not appear as a MSD device that you will have problems because, in that case, special drivers are necessary to communicate with it, something the NAS does not have. 
Title: Re: Is there an easy way to backup the DNS-320L?
Post by: Manul on March 24, 2016, 06:39:25 AM
@fx1024: Sure, it's only 13 lines so I'll just post it here:

Code: [Select]
#!/bin/sh
DATE=$(date "+%d-%m-%Y")
BUDISK=/dev/sdc1
BUDIR=/mnt/USB/USB1_c1/backups_platte
BUDEST=$BUDIR/$DATE
BUSOURCE=/mnt/HD/HD_a2

[ -d $BUDIR ] || { echo "Backup-Verzeichnis $BUDIR nicht gefunden, Abbruch!"; exit 1; }
df -h $BUDIR | grep $BUDISK || { echo "Backup-Laufwerk $BUDISK nicht gemountet, Abbruch!"; exit 1; }

rsync -avX --delete --link-dest=$BUDIR/current $BUSOURCE/ $BUDEST/
rm $BUDIR/current
ln -sfT $BUDEST $BUDIR/current

The script uses rsync to do an incremental backup to the USB attached disk, so you'll need rsync on the NAS (don't know whether that's available) or you'll have to modify the script to fit your needs.

@ivan: Are you sure about that? I use an USB to SATA docking station by Sharkoon and my external disk shows up as /dev/sdc and mounts as ext4, so its behaviour is identical to that of the internal disks. I think I even formatted it as ext4 on the NAS itself.
Title: Re: Is there an easy way to backup the DNS-320L?
Post by: fx1024 on March 24, 2016, 08:05:23 AM
@Ivan. When I connect the USB HDD to my Win7/64 PC I sees it as "Intenso USB 3.0 device USB Device" with "Location: on USB Mass Storage Device". So according to what you mentioned it must be a MSD.

@Manul. I enabled SSH. I'll try your approach :)
Title: Re: Is there an easy way to backup the DNS-320L?
Post by: Manul on March 24, 2016, 08:28:36 AM
Good luck and let us know how it goes! Also, don't hesitate to ask if you need any help. I'm away over easter weekend though, so might take a while to answer.
Title: Re: Is there an easy way to backup the DNS-320L?
Post by: fx1024 on March 31, 2016, 07:16:07 AM
@Manul. Unfortunately I was unable to connect to the DNS320L through SSH. I activated it but I faced the known "WARNING: Your password has expired" problem.

I contacted the DLink support and I'll keep the thread updated with any useful feedback I may get.
Title: Re: Is there an easy way to backup the DNS-320L?
Post by: FurryNutz on March 31, 2016, 07:21:28 AM
Have you reviewed this? http://forums.dlink.com/index.php?topic=64443.0 (http://forums.dlink.com/index.php?topic=64443.0)
Title: Re: Is there an easy way to backup the DNS-320L?
Post by: ivan on March 31, 2016, 12:11:48 PM
Another point that may or may not be relevant.  Your USB drive reports itself as a USB 3 device and the NAS is only a USB 2 device.  While this normally would not matter it can be a problem with USB powered devices (USB 2 does not supply the amount of power that USB 3 can).  You may need to use a powered USB 3 hub to actually get your drive to spin up normally.

We came across this problem with a customer today when his new large capacity USB 3 drive wouldn't work with his laptop USB 2 ports.  We fixed it by making a powered adapter to go between the drive and laptop powered by a 5v @3A power brick.
Title: Re: Is there an easy way to backup the DNS-320L?
Post by: fx1024 on April 01, 2016, 02:20:20 AM
@ivan. Ivan thanks for your reply. This HDD has its own power supply. AFAIK it doesn't draw any current from the NAS.

What is interesting here is that the same external 4TB USB 3.0 HDD works just fine when I attach it to the USB port of my router!. Although the USB / NAS functionality of the router is a far fetched feature, it supprisingly works better than the DLINK NAS (which its core function is to be a Network Attached Storage)
Title: Re: Is there an easy way to backup the DNS-320L?
Post by: Manul on April 01, 2016, 02:58:02 AM
As a potential alternative solution: Would it perhaps be possible to set up the HDD attached to the router as destination for remote backup?
Title: Re: Is there an easy way to backup the DNS-320L?
Post by: fx1024 on April 01, 2016, 04:04:35 AM
@FurryNutz. Thank you very much for your reply. I read the whole topic. It sounds like the only working solution is to install a third party add-on (OpenSSH) in order to have access to SSH.
I installed OpenSSH but I can't login either as "root" with blank password or as "admin" with the password I'm using to access the web UI.

Dear fellows don't get me wrong but there are some things I find difficult to understand with this device and I'm bit confused. For example If firmware 1.07 supports SSH what is the point to install a third party addon to have access to it? Is the SSH function of the NAS broken? If it's broken why DLINK doesn't fix it?

Generally speaking I'm getting disappointed with this device and DLink itself. I have bought DNS-320L about 2-3 weeks now and everything about it looks and feels completely amateurish. I bought this NAS as a "ready to use" solution to do a certain job in my office not to hack around. I didn't bought it as a hobby project. (I happily use Raspberry PI for that). Please don't get me wrong I really appreciate everybody's support & help around here. I just don't understand what DLink consider an off-the-shelf product.

All I wanted was three things - that according to its specs were available:
1. Schedule FTP downloads to the NAS. In order to get the backup files from my web servers. (Works. The reason I preferred this NAS)
2. Taking PCs' backups to the NAS (Woks)
3. Taking periodic backup of the NAS to USB connected HDD for off-site safe keeping. (Not Working)

Do you see an exotic requirement above? Do you honestly believe that I have raise the bar of expectations too high?

I could understand if I have to hack this think to run let's say... a Wordpress blog on it or a phpBB forum for fun, but I really don't get it why I have to "hack" this thing to get a backup of my files...

PS. I see that there is built-in functionality to run forums and blogs  :P
 





Title: Re: Is there an easy way to backup the DNS-320L?
Post by: fx1024 on April 01, 2016, 04:08:31 AM
As a potential alternative solution: Would it perhaps be possible to set up the HDD attached to the router as destination for remote backup?

Manul it is a great thought! Unfortunately it doesn't work. I tried it.  DNS-320L requires SSH and RSYNC installed to the other end in order to make remote backups.
Title: Re: Is there an easy way to backup the DNS-320L?
Post by: Manul on April 01, 2016, 04:20:14 AM
I installed OpenSSH but I can't login either as "root" with blank password or as "admin" with the password I'm using to access the web UI.

Have you tried logging in as root with the web UI password? Just guessing here since I don't have OpenSSH installed, but might be worth a try.

If you hava a Raspberry Pi running, how about using that as a backup destination?

Unfortunately it doesn't work. I tried it.  DNS-320L requires SSH and RSYNC installed to the other end in order to make remote backups.

Even if you uncheck "use ssh encryption" in the remote backup settings? Is this regardless of whether you select "NAS to Linux" or "NAS to NAS"?

BTW, I totally understand your frustration with the device. There's few things more annoying than something you just need to work which stubbornly refuses to comply. I'm not sure whether this forum is the best place to vent about that, though. I don't know whether D-Link even monitors postings here. I think most people posting here are just fellow users (albeit possibly more lucky ones) trying to be helpful.
Title: Re: Is there an easy way to backup the DNS-320L?
Post by: fx1024 on April 01, 2016, 05:31:43 AM
Have you tried logging in as root with the web UI password? Just guessing here since I don't have OpenSSH installed, but might be worth a try.
I tried to login to SSH with all available combinations with no luck.

If you hava a Raspberry Pi running, how about using that as a backup destination?
I use Raspberry to play at home while the NAS is at my office. I had initially some thoughts  to buy a Pi and build a NAS around it but I preferred to buy a more "professional" solution :). But it is definitely a great idea to use the existing Pi or buy a new one to built a remote NAS. Thanks!

Even if you uncheck "use ssh encryption" in the remote backup settings? Is this regardless of whether you select "NAS to Linux" or "NAS to NAS"?
Unfortunately yes. SSH and RSYNC are required in both cases. I have "official" answer on this by the DLINK support.

I don't know whether D-Link even monitors postings here. I think most people posting here are just fellow users (albeit possibly more lucky ones) trying to be helpful.
I really appreciate your help here and I can assure you that I've got more interesting suggestions here than I've got from DLink support.

So far from DLink support:
1. I was informed that the remote backup doesn't work if the remote site has not ssh and rsync.
2. I was asked to test also a USB pendrive. I did. It didn't work either.
3. Was prompted to clear the browser cache (!!!) This was the official answer after the escalation of the issue to the second level of support!