Showing posts with label QNAP. Show all posts
Showing posts with label QNAP. Show all posts

Sunday, 15 February 2015

Rsync server on QNAP nas

To use  the Rsync server on QNAP remember to select the "Allow remote Rsync server to back up data to nas"



Then to run a manual rsync backup from Ubuntu in terminal enter the following command:

$ rsync -azvvv /home/user/ servi@[qnap ip or hostname]::user/Ubuntu/

The above command will

-vvv be very verbose
-a is archive mode
-z compress file data
servi - is the username configured on the QNap Rsync screen
user/Ubuntu/ - is the destination folder








Sunday, 16 November 2014

Delete log files older than x days on QNAP NAS


The easiest way to delete files older than 'x' days via command line (therefore a cron job can be created to delete it daily) would be:

find /share/Download/messages* -mtime +5 | xargs rm -rf

Then crontab -e and add the following to the bottom

1 0 * * * find /share/Download/messages* -mtime +5 | xargs rm -rf

This will then keep the last 5 days worth of logs.

Good article on editing cron located here : http://wiki.qnap.com/wiki/Add_items_to_crontab

Thursday, 26 June 2014

QNAP TS-412 Firmware 4.0.2 to 4.0.7 upgrade


The web based upgrade for the firmware failed on this device; to manually do the upgrade follow this procedure:


remove all the update folders and then re-create one with a link to the other

download the firmware

make a copy of the file as the source will get removed during the upgrade (optional step)

[~] # rm -rf /mnt/HDA_ROOT/update/
[~] # rm -rf /mnt/update
[~] # mkdir /mnt/HDA_ROOT/update
[~] # ln -sf /mnt/HDA_ROOT/update /mnt/update
[~] # cd /share/Public
[/share/Public] # wget http://eu1.qnap.com/Storage/TS-412TurboNAS/TS-412_20140412-4.0.7.zip
[/share/Public] # unzip TS-412_20140412-4.0.7.zip
[/share/Public] # cd ~

[~] # cp /share/Public/TS-412_20140412-4.0.7.img /share/Public/TS-412_20140412-4.0.7-work.img
[~] # /etc/init.d/update.sh /share/Public/TS-412_20140412-4.0.7-work.img

this will have an output like
cksum=1718371300
Check disk space available for FW update: OK.
Using 120-bit encryption - (QNAPNASVERSION4)
len=1048576
model name = TS-412
version = 4.0.7
boot/
config/
fw_info
initrd.boot
initrd.boot.cksum
libcrypto.so.1.0.0
libssl.so.1.0.0
qpkg.tar
qpkg.tar.cksum
rootfs2.img
rootfs2.img.cksum
rootfs_ext.tgz
rootfs_ext.tgz.cksum
uImage
uImage.cksum
update/
update_img.sh
4.0.7 20140412
MODEL NAME = TS-412,new version = 4.0.7
limit version = 3.8.2
Allow upgrade
tune2fs 1.41.4 (27-Jan-2009)
Setting maximal mount count to -1
Setting interval between checks to 0 seconds
Update image using HDD ...
Check uImage size ... Pass
Check initrd.boot size ... Pass
Check rootfs2.img size ... Pass
Check Flash ROM
Update Kernel ...
Update Basic RootFS ...
Update Basic RootFS2 ...
1+0 records in
1+0 records out
Update Finished.
set cksum [1718371300]

then afterwords reboot
# reboot

Sunday, 29 December 2013

Install SVN on QNAP NAS

Installing SVN on QNAP

ssh into the QNAP NAS with the admin account.


on the QNAP then install SVN via ipkg

ipkg update
ipkg install svn

To determine the hard drive / volume you want to save the repository on:

df

will show something like:

/share/HDA_DATA

I decided to create a repository svn and then a project folder within that.

mkdir /share/HDA_DATA/svn/projectA

and then

svnadmin create /share/HDA_DATA/svn/projectA

and edit the config files to password protect write

vi /share/HDA_DATA/svn/projectA/conf/svnserve.conf

[general]
### These options control access to the repository for unauthenticated
### and authenticated users.  Valid values are "write", "read",
### and "none".  The sample settings below are the defaults.
anon-access = read
auth-access = write
### The password-db option controls the location of the password
### database file.  Unless you specify a path starting with a /,
### the file's location is relative to the directory containing
### this configuration file.
### If SASL is enabled (see below), this file will NOT be used.
### Uncomment the line below to use the default password file.
password-db = passwd

and then edit the passwd file

[users]
username = password

and then start the SVN server with

svnserve -d --listen-port=3690


On Ubuntu I installed the following to enable command line and Nautilus / Gedit integration

sudo apt-get install rabbitvcs-nautilus rabbitvcs-gedit
sudo apt-get install subversion

To test the repository I used RabbitVCS SVN via Nautilus, Repository browser and then entered the url:

svn://ipaddress:3690/share/HDA_DATA/svn/projectA/

Tuesday, 28 February 2012

Streaming MKV from TwonkyMedia on ARM (QNAP QPKG) to Samsung TV

 



With the default configuration in TwonkyServer; streaming MKV content to a Samsung TV will not work as TwonkyServer detect the TV as a "Generic Media Receiver" and will give an on screen message "format not supported" as reported in various forums and blogs.

To fix this I did  the following:

Upgrade to latest TwonkyMedia 6 version (6.0.34) via QPKG

Let TwonkyServer build the database

Enable sharing for new media receivers automatically

Connect with your TV to TwonkyMedia

Under "TwonkyServer/Advanced Settings/Media Receivers"

locate the Samsung TV in the list from the MAC address or IP Address and change the device type from "Generic Media Receiver" to "Samsung TV"

retried playing MKV (720p) on the NAS to the Samsung TV via TwonkyServer worked as suspected now.

The next step would be to test it with various video- and sound formats as well as MKV containers with header compression.

Sunday, 5 February 2012

Canon MX420 - how to transfer scanned documents from the memcard

Although this printer does not have AirPrint support it had a feature to "scan to pdf" without using a pc (just to USB or Memory card )

So I insterted a fast memory card into the printer with adequite space and it works perfect.

My next step is to create a cron job on my NAS to periodically sync all files on the printer memory card to a folder on the NAS.

Following is the technical discovery / how I did it.

First was to discover if the memory card is exposed to the network & then the file sharing type (assuming it will be a windows share) ;

It was indeed on:

\\PRINTER_IP\canon_memory\CANON_SC\DOCUMENT\0001
Was two test PDF's I scanned.

most people will only need this to copy the files to a PC, however as stated I want it automated to my NAS.

I created a temporary folder on my NAS and created a sync job on the QNAP NAS that monitor the memory card and once a file change is detected it copies the files to the temp folder; from there I rename and or sort it into the correct directories.

Drive mapped from QNap to the printer with:

mount.cifs //PRINTER_IP/canon_memory/CANON_SC/DOCUMENT/0001 /share/somewhere/Printer


Tuesday, 31 January 2012

iTunes MAC & iTunes PC not equal to iTunes iPad

So the wonderfull world of "comliant to this & that" on the spec sheet vs. reality set in again. Now this might be down to lack of product knowledge as well but so you learn.

From the little Apple experience I gained so far I could really say in a "pure" Apple eco-system everything works brilliant and as planned, but trying to add 3rd party or other service to this ecosystem seem to be problematic.

iTunes for PC & MAC have a feature for "Shared" resources

Locate the service in iTunes

 

whereas iPad/iPhone itunes does not let you choose your itunes library. You always need to connect to your Mac/PC (remote) itunes and sync with your ipad.

So the feature called iTunes Server does not mean you can assume it can stream to all Apple type devices.

So in my instance where I enabled the iTunes server on a QNAP NAS the Workaround:

Use the QMobile application provided by QNAP to remotely play the music library on the iPad.

Monday, 30 January 2012

QNAP iTunes Server dying

Testing a few mp3's on the NAS to iTunes PC worked 100%, after transferring my complete collection the iTunes server kept on dying via the web interface. So it was back to the old trusted CLI via ssh and fault finding:

Firstly to check if the iTunes server process is running or not:

ps | grep mt-daapd

And to find the command options:

mt-daapd --help

To start the process manually:

mt-daapd -d 9 -c /etc/mt-daapd.conf -f 

with

-d 9 setting the debug level to 9

-c to use a spesific configuration file

-f to run it in teh foreground allowing you to see the debug messages in real time.

running this will halt on the reason for the iTunes server to fail.

if the error is with .m3u files

this can be fixed by changing a line the qnaps /etc/mt-daapd.conf

turing: process_m3u 1 => process_m3u 0

In my instance a single mp3 file caused the process to stop, I corrected the mp3 id tag 

Restarted the service and everything worked like a charm

Thursday, 5 January 2012

QNAP NAS



So I took the plunge and migrated from an pc based NAS device (OpenFiler)  to a QNAP NAS TS-412.

I am very impressed with the device build, really a solid design and after upgrading to the latest firmware it detected a 3TB Western Digital drive without any problems.

The device is extremely silent - to compare: the DVD player playing a DVD is making more noise than the NAS :-)

So I guess the next few blog postings will have something to do with services and applications on the NAS as and when I enable them.
Current firmware version: 3.5.2 Build 1126T