QNAP Crashplan Backup 3.0.3 quick step installation with QPKG

5

Category : Geek

After several problems with the manual installation of Java JRE for embedded and CrashPlan 3.0.3 for Linux I finally gathered all informations to apply QPKG packages for proper installation on various QNAP systems (tried it on my QNAP TS-410 Turbo NAS in first instance).

Here is a quick step installation:

QNAP ARM CPU (x10 / x12 / x19)

Java Runtime Environment installation
- Download Java JRE for ARMv5 Linux – Headless (Early Access) EABI, glibc 2.5, Soft Float, Little Endian – you need to enter some data there to receive the download link (sorry cannot provide a direct download link as this is considered to be illegal)
- Copy file (name should look like ejre-1_6_0_25-fcs-b06-linux-arm-sflt-eabi-headless-14_apr_2011.tar.gz) to the Public folder on your NAS
- Download QNAP ARM Java package
- Unzip and install QPKG
- Enable JRE in QPKG manager

CrashPlan installation
- Download QNAP ARM CrashPlan package
- Install QPKG
- Enable CrashPlan in QPKG manager

 

QNAP x86 CPU (x9 without x19)

Java Runtime Environment installation
- Download QNAP x86 Java package
- Install QPKG
- Enable JRE in QPKG manager

CrashPlan installation
- Download QNAP x86 CrashPlan package
- Install QPKG
- Enable CrashPlan in QPKG manager

 

GUI access from a diffrent machine (e.g. Windows 7 box)

Configuration on QNAP NAS
- Disable CrashPlan in QPKG manager
- Edit /share/MD0_DATA/.qpkg/CrashPlan/conf/my.service.xml and replace
<serviceHost>127.0.0.1</serviceHost>
with
<serviceHost>0.0.0.0</serviceHost>
- Enable CrashPlan in QPKG manager

GUI installation on Windows machine (same configuration as for Linux GUI)
- Download CrashPlan client
- Install CrashPlan on Windows machine
- Go to Control Panel -> Services -> Look for CrashPlan Service (German: Systemsteuerung -> Dienste -> CrashPlan)
- Stop CrashPlan service
- Edit properties of CrashPlan service and set to manual start up (German: manuelles Starten)
- Edit C:Program FilesCrashPlanconfui.properties (maybe locatd in different folder) and replace
#serviceHost=127.0.0.1
with
serviceHost=...
Best is to use your NAS IP address – but the hostname should work as well
- Start CrashPlan – it should connect to your NAS (you will see your NAS name appearing there as source for backup)
- You may also remove the CrashPlan Tray from your Autostart folder because it will not work for a remote machine (if someone got a solution for this issue, feel free to post it!)

 

NOTE – This way of setting up CrashPlan on an ARM QNAP system with very low memory (256MB) proved to be better than the manual setup I did before. There were lots of memory problems and instability.

SOURCES – The following QNAP forum sources are best if you want to check for updates of the QPKG packages:
Java JRE QPKG – http://www.turbonas.com/phpBB3/viewtopic.php?f=18&t=870
CrashPlan QPKG – http://forum.qnap.com/viewtopic.php?f=227&t=39078

If you have any questions concerning manual installations of Sun / Oracle JRE for embedded systems on ARM or similar, please post a comment. Same goes for Crashplan installation on various Linux systems.

WordPress NGG NextGen Gallery JW imagerotator slideshow problems

Category : Geek

I experienced some problems with the NextGen Gallery widget showing random images on http://www.metal-nights.de. There were simply no images showing up any more – the imagerotator flash keeps loading forever.

The reason for this were too many images when chosing “all images” as source for the rotator. The PHP callback providing the XML “image playlist” for the imagerotator.swf was empty because of out of memory-issues. This was the case if there were more than 1600 images in the database. The query delivered a fully parsed result set which was simply too large.

If you do not want to get rid of all your images, the only way to solve this issue is to limit the result set:

- open wp-content/plugins/nextgen-gallery/xml/imagerotator.php for editing

- look for
$thepictures = $wpdb->get_results("SELECT t.*, tt.* FROM $wpdb->nggallery AS t INNER JOIN $wpdb->nggpictures AS tt ON t.gid = tt.galleryid WHERE tt.exclude != 1 ORDER BY tt.{$ngg_options['galSort']} {$ngg_options['galSortDir']} ");

- change to
$thepictures = $wpdb->get_results("SELECT t.*, tt.* FROM $wpdb->nggallery AS t INNER JOIN $wpdb->nggpictures AS tt ON t.gid = tt.galleryid WHERE tt.exclude != 1 ORDER BY RAND() LIMIT 100;"); //tt.{$ngg_options['galSort']} {$ngg_options['galSortDir']} ");

This will return 100 random sorted images. This will be enough for about 10 minutes displaying the page without reload. You may even reduce the number to about 20.

The plus is that your page will speed up.

Enjoy.

English wikipedia anti black-out extension for Google Chrome

Category : Geek

Did you hear about the SOPA/PIPA blackout of the English Wikipedia?

Here is the solution for a workaround – I put a little extension for Google Chrome revealing the Wikipedia pages, the work of some minutes – actually my first chrome extension ever – but it was kind of interesting…

Install Extension – check it out at http://en.wikipedia.org!

Freaky, isn’t it?

Edit: Improved to version 1.1 – proper display of the wikipedia page now.

Requests via HTTPS (speaking of .NET WebClient)

Category : Geek

Actually I had some troubles today with a simply request downloading a file with the .NET WebClient class via https. Instead of http most webservers seem to expect an User-Agent header for security reasons when accessing the webserver through https.

The solution is just plain simple – add any random User-Agent header to the request otherwise the returned content or file is empty (0 bytes).

Dim oDownload As New WebClient
oDownload.Headers.Add(“User-Agent”, “Your App 1.0.0.0″)
oDownload.DownloadFile(“https://any.com/file.zip, “file.zip”)

I will not talk about the CustomSoapHeaders I was using. For the moment… it is a bit too late for in-depth programming details.

Note: WebClient class is available in the System.Net Namespace from .NET Framwork 2.0 and following.

Thunderbird 5.0 vs. Lightning 1.4b

Category : Geek

Recently my Mozilla Thunderbird was upgraded to 5.0 on three different machines. I always prefer to use lightning to access my google calendar and keep track of my schedule. So Lightning 1.4b was installed on all machines.
But out of a sudden today Lightning stopped working on my laptop. There was not even a configuration tab anymore nor any icon in the Extensions tab. So what did I do? Restarted Thunderbird – Lightning does not work. Tried to remove Lightning – Thunderbird crashed, Lightning was not removed. So clear 6 steps brought me to the goal:
- Remove Lightning 1.4b – DO NOT AUTOMATICALLY RESTART THUNDERBIRD
- Close Thunderbird
- Open Thunderbird
- Install Lightning 1.5b
- Close Thunderbird
- Open Thunderbird again
Safe and clean method…

High tech: Samba filenames correctly displayed in Linux, file times synchronization (applies to QNAP and other linux NAS)

Category : Geek

New firmware version, new issues – and new points to think about.

If you often login to your NAS shell you might have seen weired letters (applies to special characters like German Umlauts and other language-specific letters) using ls or dir to display the folder content. This results from different character set used by Samba clients and linux itself. Most NAS devices might use UTF-8 as characterset for the filesystem whereas Windows clients use CP850 and MAC clients also use UTF-8.

If you are editing files directly from the NAS with an editor which checks for changes of this files you might have troubles after saving the file with this editor and afterwards asking you if it should use the “updated” version. This is due to time differences between server (NAS) and client. So the goal is to keep both synchronized.

What can you do to change this? You need to do the following steps:
1. change the settings for Samba
2. translate / convert existing filenames into the new character set

Please first check the last point! Maybe you only need to change the character encoding of your SSH client to display the filenames correctly!

So let us just go through these two simple sounding steps.

1. CHANGING SAMBA SETTINGS

- Edit smb.conf (usually located in /etc ; /etc/samba OR /etc/smb – on QNAP NAS systems use /etc/config/smb.conf) by typing something like

vim /etc/config/smb.conf

- Look for the old value for dos charset or something similar and replace with / add the folowing values:

dos charset = CP850
unix charset = UTF8
display charset = UTF8
time server = yes

dos charset is the character set used by your windows client. You should set it to CP850.
unix charset is  the character set used by the linux on your NAS. Often UTF8, might also be ISO 8859-1.
display charset is the character set used in Samba messages (i.e. error messages). You might use UTF-8 as display characters set on your linux box.
time server sets the Samba server as source for time synchronization.

- Restart samba using something like (this is not really necessary as Samba should pull the new configuration but it is good to know that it uses the new configuration NOW):

/etc/init.d/smb.sh restart

2. CONVERT EXISTING FILENAMES

- Be sure perl is installed – if not you should install it. On QNAP NAS and similars use ipkg:

ipkg install perl

- Get the latest version of convmv and extract it (first change to a folder where you want to extract the tool, e.g. your home directory):

wget http://www.j3e.de/linux/convmv/convmv-1.14.tar.gz
tar xzvf convmv-1.14.tar.gz
cd convmv*

- You can now use convmv to convert filenames between different encodings. It might be interesting to first check the conversion with some examples (go to a folder where files or folders with special characters are located and use convmv WITHOUT –notest to just display the changes, when using –notest all changes are written to disk). Here is an example for first converting old CP850 dos filenames to UTF-8:
/root/convmv-1.14/convmv -r -f cp850 -t utf8 * --notest
Be aware that this is a full recursive conversion!

And now play a little bit around with special character filenames. If you check the filename in the filesystem using a client like putty please keep in mind that the SSH client tool should display the content in UTF-8. (in putty use Change Settings / Load Profile and change the translation in Window -> Translation to UTF-8)

Any feedback is appreciated!

High tech: QNAP disaster recovery for models TS-109, TS-209, TS-110, TS-119, TS-210, TS-219, TS-219P, TS-410, TS-410U, TS-419P, TS-419U

41

Category : Geek

Now something completely different.

Yesterday I was looking for a way to recover my QNAP TS-410 NAS server system. Containing lots of data and making it available over the net to various places, this little high tech helper is simply essential for me. Of course I do regular backups which are even stored in totally different locations (besides of local script based backup), but the NAS makes working a lot easier. Confronted with the thought to maybe have to work without it for at least four weeks was enough motivation to get it back to work.

What happened? I discovered a new firmware update (3.2.2) for my unit which had some great improvements. Because of the smooth update process with the last firmware updates I thought to just do it. Anyhow the update process was cancelled (because of too much traffic from the NAS at that time?). Second try gave a success message, so I confirmed the request to reboot. But nothing happened afterwards. Only the green (power) light flashing red and green. You could not see any hard disk access during boot up process.

Conclusion: flash image damaged.

The net only gave me a solution for older models which did not work with my TS-410.

So here is the solution which I luckily found out after 2 hours of search and 4 hours of download process (yes, the QNAP ftp server is really slow!):

- Power down your NAS system

- Unplug all hard disks (pull out the hot swap drives)

- go to ftp://csdread:csdread@ftp.qnap.com/NAS/live_cd/ and download the right ISO file for your NAS system (or click the links below – always use right button and “Save as…”):

TS-109, TS-209Data_Recover_live-cd_2009-01-15_TS109-209.iso

TS-110, TS-119, TS-210, TS-219, TS-219PFlash_Reburn_live-cd-2009-09-24(TS-110&119&210&219&219P).iso
Important Note for TS-110 provided by user achipa: If the recovery does not seem to work (no reaction when you boot), doublecheck that you have the correct .iso file. I have a TS110 and discovered that I had to boot the Flash_Reburn_live-cd-2009-12-09(TS-410&410U&419P&419U).iso and NOT the other one (even though that one had the TS110 in the filename and the docs referred it).
NOTE: For some TS-110 models it seems like you have to use Flash_Reburn_live-cd-2009-12-09(TS-410&410U&419P&419U).iso with a cross cable

TS-410, TS-410U, TS-419P, TS-419UFlash_Reburn_live-cd-2009-12-09(TS-410&410U&419P&419U).iso

Note from user achipa to check if you have the right ISO file: After boot-up with the ISO log in as root (user root / password root) and do ls -l /tftpdroot/

- download the according pdf file which contains a manual for flashing your NAS system:

TS-109, TS-209TS109-209_data_recovery_with_Live_CD.pdf
TS-110, TS-119, TS-210, TS-219, TS-219P, TS-410, TS-410U, TS-419P, TS-419U -Flash_Reburn_TS-x10&x19_Series_Firmwar_Update_Through_Recovery_Mode&Live_CD.pdf

- burn the ISO image to CD

- boot burnt CD on PC or laptop and wait until the login prompt appears – ignore all error messages

note: the following steps only apply for all TS-x10 and TS-x19 models! for other models read pdf file mentioned above!

- connect your PC or laptop network port directly to your NAS (no switch in between!) – use LAN port 2 if your NAS has two ports

- use a thin tool like a paper clip to press the reset button on the back of your NAS

- hold the reset button and power on your system

- you will hear a long or two short beeps

- the flash image will be loaded from your laptop or PC – during that process the orange LAN light flashes

- next, your NAS will try to re-program its flash memory – red light remains lit

- do not do anything until you hear a long or two short beeps

- your system is now rebooted and back at work

- you may now put the hard disk drives back in

- good luck with your next try to update your firmware.

HINT
If you own a QNAP NAS with small flash (up to 16MB) memory you will NOT have to recover your settings. They will be loaded from the hard disks. Your flash memory only contains a loader for the operating system (actually a bit more but that is not the matter) – lucky ones (like me). On a “professional” model (like 419P) re-programming the flash memory may cause loss of your settings (not verified – just be aware that this might be possible).
Anyway you should save your configuration binary every now and then!

Great news: the view in my Servant Salamander file manager is now updating when I create or remove files on my NAS!

Hope this helps some people having problems with their NAS.

Feel free to post comments or link back to this article.