DeutschEnglish

Submenu

 - - - By CrazyStat - - -

14. May 2012

Mount clonezilla image to restore single file (browse)

Filed under: Linux,Windows — Tags: , , , , , , , , , , — Christopher K. @ 12:28

Clonezilla is a fine tool to backup/restore/clone partitions or drives. It is very powerful, can handle both Linux and Windows partitions and so on. If you do not know it, you should really give it a try. It is really free software (open source), which means it is also free to use for commercial purposes.

By the way, if you want to backup/restore images of Windows partitions/drives, I’d also recommend DriveImage XML which is also very powerful yet simple (only free for private use). Windows 7 has also built-in backup and imaging tools, which you can give a try. But this post is about Clonezilla.

One important feature that Clonezilla does not offer out of the box is browsing images to restore single files. You can only restore complete partitions or drives.

But there is a way around this, which is discussed in this forum thread, although not perfect as it requires lots of time and disk space as well.

The basic approach is to convert the whole image into a (probably huge) img-file that can be easily mounted. In the forum post linked above several different commands are discussed depending on your image file.
Here I’d like to show you what worked for me.

In my case, the file was compressed using gzip and it was an image of a linux partition (ext3). I used Ubuntu Linux to mount the image. The steps I took:

  1. Install partclone (sudo apt-get install partclone)
  2. Prepare an img-file somewhere where enough free disk space is available (touch /dir-to-new-image/partition.img).
    You should have at least as much free disk space as the size of the image there.
  3. Convert the clonezilla-image into the img-file:
    sudo cat /dir-to-images/partition.ext3.ptcl-img.gz.*
    | sudo gzip -d -c
    | sudo partclone.restore -C -s - -O /dir-to-new-image/partition.img

    (This is one line. Note the minus after -s. I overlooked it when I tried this first.)
    This will take some time, dependent on how big the image and how fast your drive(s).
    There are other commands in the forum thread for NTFS images and other compression formats.

  4. Mount the img-file:
    sudo mount -o loop -t ext3 /dir-to-new-image/partition.img /mnt

Thanks a lot to all posters of the forum mentioned above for these hints, especially bfitzhugh, nutria007, ttguy and gaebriel!

P.S.: It’s always good to have a (recent) backup ;-) One drive of mine just crashed after about two years in operation, so I know what I am talking about…

Think about what pain it would be if the drive of your laptop / desktop would crash just right now. If you get a bad feeling thinking about this, you should make a backup now.

5. May 2012

TortoiseSVN painfully slow (Log)

Filed under: Windows — Tags: , , , , , , — Christopher K. @ 21:14

I had a problem with TortoiseSVN: Sometimes it behaved painfully slow. Especially when I wanted to view the log of CrazyStat’s svn repository, it took about 10 minutes (!) to show it. First I thought the problem was caused by the Sourceforge servers, but then I realized that other svn clients did not have the same problem. I tried several things and the solution finally was quite simple and even listed the the TortoiseSVN FAQ:

Browsing very slow in explorer and file/open dialog.

If you have mapped network drives which are not resolved, either because the drive is inaccessible, or you have not logged in, file browsing may become unresponsive while Windows tries unsuccessfully to access the drive. Either unmap the drive or ensure that it can be accessed

 

I first did not think that this was my problem as I did not experience slow browsing in explorer or file/open dialog. But after I unmapped all unresolved network drives, it worked great again.

By the way, I’d recommend TortoiseSVN to anybody who is searching for a windows svn client. I have not seen any other client that powerful yet simple.

I hope this might be helpful for somebody who has the same problem.

28. April 2012

CrazyStat 1.71 RC1 released

Filed under: CrazyStat — Tags: , , , , , , , — Christopher K. @ 20:31

Today I released CrazyStat 1.71 RC1, the first Release Candidate of version 1.71. As there have already been two beta-versions tested by some testers, I consider this release candidate quite stable. I expect that no or only small changes will be made for the final version. Therefore, I’d like to encourage all CrazyStat users to update CrazyStat to 1.71 RC1. It is very simple, as described in the FAQ.

So what are the major changes?

  • New languages: Russian and Danish. Thanks a lot to the translators Vladimir and Liza! I hope CrazyStat will be translated into more languages soon. It is really not much work. Please contact me if you are interested.
  • PHP4 support dropped. I removed all workarounds for old PHP versions. Now at least PHP 5.1 is required. If your host is still running PHP4, you should really update or change to another hoster. PHP4 is not maintained for quite a while now. Also support for old GDlib-versions was dropped (1.x).
  • You can now link the entries of the file-module to the files. See the config setting you need to set.
  • IP anonymization reworked. This is now turned on by default. See FAQ for more information.
  • Average and total visiting time in hits-module
  • New logo by kartoffelpfluecker (thanks!)
  • Improved UTF8-support
  • New Browsers (Firefox-Versions), Bots, Operating Systems etc.
  • Lots of (smaller) fixes, i.e. producing PHP notice errors or invalid (X)HTML
  • Fix of a bug that caused weird ordering of the days-module sometimes
  • Fix of a bug that made Chrome transfer passwords unencrypted and corrupt the password file when changing passwords using Chrome

So this is more a maintenance release, not a major whole new version. See history for more details (with CrazyStat’s new public SVN hosted on Sourceforge, you can even track every individual change).

I hope you enjoy the new version. You can download it here.

Tell me what you think about it in the comments. In case you have problems, please ask in the support forum.

Enjoy using CrazyStat!
Christopher

26. April 2012

How to include CrazyStat in WordPress

Filed under: CrazyStat,Wordpress — Tags: , , , , , — Christopher K. @ 00:52

Of course it is possible to include CrazyStat in wordpress. I will describe here how it can be done. This approach assumes you have your own wordpress installation and can edit templates. It might not work this way if your blog is hosted on wordpress.com or similar. But I guess using CrazyStat in these cases would still be possible. Contact me if you need to know how and I will have a closer look.

So I assume you have a running wordpress installation and installed CrazyStat like described in the readme (at least steps 1-6 of quick install instructions). I assume you have a backup of your wordpress installation (at least the themes folder).

So the question is where to put the include code:

<?php @include_once("stat/src/include.php"); ?>

Log into the wordpress admin panel and click appearance/editor (German: Design/Editor). Make sure you selected the correct theme in the dropdown menu on the top right.

In case you do not want to use a counter

Click on “footer.php” on the right. You will see some HTML / PHP code in the editor. Put your cursor just before </body> (which should be quite at the end).  This is the best place to insert the CrazyStat code:

<?php @include_once("stat/src/include.php"); ?>

The path is seen from the wordpress root-directory. This code assumes you installed CrazyStat in the wordpress root-directory under “stat”. In case you installed it one level higher, you would need to use:

<?php @include_once("../stat/src/include.php"); ?>

Save your changes.

You might also need to adjust $config_rel_path. See config-documentation for details.

In case you want to use a counter

In this case, you’d need to find the place in your template where you want to place the counter. This should normally be somewhere after <body> in header.php, before </body> in footer.php or in sidebar.php. Unfortunately you need some HTML experience to find the correct place here. Use the same code as above.

In case you have problems

Please ask in the CrazyStat support forum in case you have problems or questions (no registration required at the moment!).

I hope I could clarify this for some people. Maybe I will do a wordpress plugin sometime. If you think this would be a great idea, tell me in the comments.

17. April 2012

CrazyStat 1.70 detects Firefox 11 as 1.x (fix)

Filed under: CrazyStat — Tags: , , , , — Christopher K. @ 00:25

Hey,

CrazyStat version 1.70 (and before) detects Firefox version 11 (and upwards) as “Firefox 1.x”.

Firefox versions were really coming up fast lately, so I did not finish version 1.71 to get all those new versions added before they come out.

To fix this issue in 1.70 (or before), simply add “Firefox/11=Firefox 11″ to stat/usr/keywords/browser.txt or even better download the current browser.txt from SVN. Just replace the file and clean the cache.

Note that you can easily customize browser detection as described in FAQ.

Of course this won’t be an issue in upcoming 1.71.

Greetings,
Christopher

26. March 2012

autoNUM turns NUM on when external keyboard is connected

Filed under: Windows — Tags: , , , , , , , , — Christopher K. @ 11:41

autoNUM a small tool meant for laptops/notebooks. It turns NUM on automatically when you connect your external keyboard to your notebook. When you disconnect it, it automatically turns NUM back off again.

This is very helpful if you use an external keyboard frequently and love to use NUM when it is plugged in.

The tool has been available for quite a while now, but now an important update has been made. It fixes a bug that made autoNUM not recognize that the keyboard is not connect on startup. This is now fixed. Furthermore, the UI has been slightly improved.

Check out the tool and tell me if you like it.

21. March 2012

Public SVN for CrazyStat

Filed under: CrazyStat — Tags: , , , — Christopher K. @ 23:12

Finally, CrazyStat’s SVN has gone public!

CrazyStat uses Sourceforge for SVN hosting. You can browse it here:

https://sourceforge.net/p/crazystat/code/

To checkout the current development version of CrazyStat, use one of these:

  • SVN over HTTP protocol:
    svn checkout http://svn.code.sf.net/p/crazystat/code/trunk crazystat-code
  • SVN protocol:
    svn checkout svn://svn.code.sf.net/p/crazystat/code/trunk crazystat-code

In the SVN repository, you can find the current CrazyStat 1.71 development version (in the trunk) along with 1.71 beta1 and beta2.

You can also read the commit logs to see what is going on with CrazyStat development.

In case you want to test the upcoming CrazyStat version 1.71, I’d recommend checking out the current development version from the trunk. Please let me know if you find any bugs or issues with the current development version (which will soon become RC1…).

This is part of my plans to make development of CrazyStat more open.

Greetings!

13. March 2012

sqlite.js: SQLite for Javascript!

Filed under: DBMS,JavaScript — Tags: , , , , , — Christopher K. @ 12:01

I just found something quite cool which I thought might be interesting to some of you.

Alon Zaka created emskripten, a LLVM-to-JavaScript converter. It can convert LLVM-bytecode such as provided by compilation from C/C++ code into JavaScript. This approach seems quite cool and it already proved to produce some cool results:

He converted the SQLite-library, which is written in C, into JavaScript. You can find (and fork) the project on github or just try the demo.

The first thing that I was curious about was: How does it store the database file? Well, it creates a new database when you do SQL.open(). But you can pass data to SQL.open(data) to start with a pre-filled database. So I think using this library would normally look like this:

  1. fetch the initial database from the server (e.g using AJAX). At least DB schema and some important data.
  2. open the database with SQL.js
  3. do some operations on the database, mostly SELECTs probably
  4. maybe fetch some more data using AJAX from the server when needed
  5. maybe send some data to the server to save changes using form or ajax

So this would mean we move some more stuff to the client. It would allow us to use SQL on the client side just like we do on the server-side. So we could use the same queries for javascript-based clients on the client and for html-only-clients on the server. (But exposing SQL-queries used in the server might make SQL injection as easy as never before…)

I see two other interesting ways of using this:

  1. In combination with HTML5 local storage – this would allow to store a persistent client-side database that could be accessed using SQL. Sounds pretty cool and the main usage scenario of SQL.js for me.
  2. On the server using node.js – but when I think about it: There are better ways to access a database within node.js, so this is probably only showing that it works, but no real usage scenario.

Tell me what you think about it.

10. March 2012

phpliteadmin: CSV import and export

Filed under: DBMS,Server Administration — Tags: , , , , , , , , — Christopher K. @ 12:24

In case you use sqlite, a serverless, transactional SQL-complete database engine, you might also know phpliteadmin. It is a web-based DB admin tool just like phpMyAdmin is for MySQL. It is small and does not require complex installation just like sqlite. It is great to do most simple operations on a sqlite database, but in my opinion it still has some important limitations and bugs.

One thing I recently missed was the possibility to import CSV files into a SQLite database. The SQLite shell makes this very easy (if the file has the correct syntax). But this has also some limitations and you have to leave the phpLiteAdmin GUI and start a SQLite shell. So I thought it should be part of phpLiteAdmin. It already had some GUI options for CSV import, but the actual import implementation was missing, so I implemented CSV import myself. On the way testing the exported csv and importing it again I noticed some export bugs of phpliteadmin like this one and fixed them on the way.

So those are the changes I did to phpLiteAdmin:

Import:

  • implemented CSV import with some features like:
  • you can define Enclosure, Escaper, Null and first-row-field-description just like when exporting
  • using PHP’s fgetcsv()
  • can import files that were exported with phpliteadmin using the same settings!
  • can even import files exported with phpliteadmin without my corrections and improvements (see below), although they are not “standard CSV”.

Export:

  • removed line terminator option because:
    • this was not implemented
    • in my opinion anything else than a linebreak does not make sense, so useless feature
  • Fix: Tables with indexes were exported multiple times
  • Fix: Last column was terminated which is not usual in CSV
  • NULLs are not enclosed anymore to allow distinction between “NULL”-text
  • FIX: Removing CRLF was not implemented
  • FIX: Tables that were not exported caused additional linebreaks in output

You can find anything related to these changes in phpLiteAdmin’s bug tracker.

You can also get my version with the improvements from the bugtracker or download it here.

I really hope this will make it into the next release of phpLiteAdmin, but unfortunately I did not get any feedback by the developers of phpLiteAdmin yet. Hopefully this is not getting a fork ;-)

I hope you like these features and bugfixes. You can give me feedback here or in the phpliteadmin bug tracker.

I really think a good database management tool for SQLite is needed and phpLiteAdmin has the potential to become one. We will see.

You can also tell me if you use some other management tool for SQLite which you think is way better ;-)

Update 2012/05/13: The phpliteadmin developers just announced that an official new version including these improvements will come up soon. Great news, I am looking forward to this new version!

4. March 2012

Forum (board) opened for discussion and support

Filed under: CrazyStat,Uncategorized — Tags: , , , , — Christopher K. @ 12:42

Today I would like to introduce Christosoft Forum.

It is meant both for support, especially about CrazyStat, but also any general discussion about things of common interest.

I hope it will be used especially for CrazyStat support.

You do not even have to register at the moment, you can post as guest if you solve a captcha. Let’s hope I can keep this setting and it won’t be abused.

So from now on, please use the forum if you have any problems with CrazyStat. Other users might help you before I find the time or you might find the solution for your problem in an old thread.

Let me know what you think of it, either here or in the forum.

Also let me know if you have suggestions, e.g. for subforums or forum settings.

Edit: This is part of my plans to make development of CrazyStat more open. Expect other steps like Bugtracker or public SVN soon…

Older Posts »