Uncategorized

Goodbye Raspberry Pi 1, welcome Raspberry Pi 2 ! (for now)

Posted on 2016-04-09. Filed under: Uncategorized | Tags: , |

Finally upgraded my old and dusty RaspberryPi git/backup/crashplan server hardware to newer version , runs four times as fast now, memory doubled, sweet! :-)

I guess RPI2 will be sufficient for a while, no need to have RPI3 for this setup for now :)

rpi2

Advertisements
Read Full Post | Make a Comment ( None so far )

Raspberry Pi : Easily backup system partition (with progress bar, ETA)

Posted on 2015-08-13. Filed under: Uncategorized | Tags: , , |

Wordpress - raspberry pi backup-1

Intro:

The goal is to create a simple script to automagically backup the entire SD card (including all partitions)  with some additional features:

  • display progress bar, speed meter (kb/s)
  • use compression to save space on target device (the one the backup is created in)
  • automatically name backup files so that they do not overlap
  • automatically pick the block device to be backed up

Step 1: Out of curiosity: Find the SD card you are backing up.

Use “lsblk” command to find all block devices:

root@raspforwarder:/home/test# lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
sdb 8:16 0 931.5G 0 disk
└─sdb1 8:17 0 931.5G 0 part
  └─truecrypt1 (dm-0) 254:0 0 931.5G 0 dm /mount/secret-data
sdc 8:32 0 931.5G 0 disk
└─sdc1 8:33 0 931.5G 0 part /media/usb1
sdd 8:48 1 59.6G 0 disk
└─sdd1 8:49 1 59.6G 0 part /media/usb0
mmcblk0 179:0 0 3.8G 0 disk
├─mmcblk0p1 179:1 0 56M 0 part /boot
└─mmcblk0p2 179:2 0 3.7G 0 part /

Above, you can see my raspberry setup with two usb hdds (sdb,sdc, 1TB each, one containing a truecrypt partition) and one usb stick (64GB). Check out the mountpoints, partitions etc.

The device we want to backup is the mmcblk0 marked as “disk” – which is the sd card plugged in our raspberry’s card slot.

Step 3: Install the “Pipe Viewer” (pv) tool:

 What is pv ? Check this out.

root@:# apt-get install pv
 Reading package lists... Done
 Building dependency tree
 Reading state information... Done
 The following NEW packages will be installed:
 pv
 0 upgraded, 1 newly installed, 0 to remove and 1 not upgraded.
 Need to get 0 B/36.1 kB of archives.
 After this operation, 136 kB of additional disk space will be used.
 Selecting previously unselected package pv.
 (Reading database ... 63655 files and directories currently installed.)
 Unpacking pv (from .../archives/pv_1.2.0-1_armhf.deb) ...
 Processing triggers for man-db ...
 Setting up pv (1.2.0-1) ...
 

Step 3: “One line to rule them all”: create simple backup script:

Create backup_raspberry.sh file with

echo creating backup...
dd bs=1M if=/dev/mmcblk0 | pv -rabep --size `lsblk -b | grep mmcblk0 | grep "disk" | awk '{ print $4 }'` | bzip2 > /media/hdd/backups/raspberry-backup-`date "+%Y%m%d"`.img.bz2
echo done. 

Step 4: Watch it run, have fun!

rasp1

Sidenotes:

  • It won’t hurt to make it cron job (make it run say, every monday ?)
  • To prevent the target drive from running out of available space pair above with tmpwatch to remove backups which are too old (2 months?) – but ONLY after the newest backup was successfully created.
Read Full Post | Make a Comment ( None so far )

We Are on the Google Street View in London ! :-)

Posted on 2014-10-16. Filed under: Uncategorized | Tags: , |

 

In June we visited London for a week. We stayed in house by the lovely quiet cul-de-sac street, Carberry Road.

One day in the morning as we were leaving the house we literally bumped into the Google Street View car! What a surprise!

At first I was like “did he make the wrong turn and ended up here?” But no, he was updating the Google Street View maps for real :-) Quickly! Grab the camera, stand still, keep smiling :-)

The timing was just perfect! If it had been couple of seconds later we wouldn’t have taken this pictures and we wouldn’t have been caught by the Google cameras :-)

After we took the picture I waved at the driver, he was kind enough to wave me back :-)

So here it is, see it for youself: http://goo.gl/maps/NYdKU

 

It’s us just after we spotted the Google street view car:

googlecar3

 

And here’s how it looked from our point of view:

googlecar1

 

 

Then the driver backed up and left:

googlecar2

Read Full Post | Make a Comment ( None so far )

Niektórzy ludzie…

Posted on 2014-10-03. Filed under: Uncategorized | Tags: , |

demot-thuje-v02

Read Full Post | Make a Comment ( None so far )

Hardware upgrade, after 5 years :-)

Posted on 2014-09-20. Filed under: Uncategorized | Tags: , |

After 5 years it was high time to make THE  upgrade.

Let the screenshots speak for themselves :)

Who knows what hardware will be there in 5 years in the future ? Food for thought…


BEFORE:

old-disk

old-cpu old-mobo old-gpuold-diskinfo

 


 

AFTER:

 

new-disk

new-cpu  new-mobonew-gpunew-diskinfo

Read Full Post | Make a Comment ( None so far )

IMGW – pogodowy Matrix czyli ostrzeżenia za pieniądze podatników

Posted on 2014-04-15. Filed under: imgw, Uncategorized |

Poniedziałek, 2014-04-14

Prognoza pogody na http://www.meteo.pl oraz http://krakow.infometeo.pl/ wskazywała na bardzo silne porywy wiatru (do nawet 100km/h) w Krakowie:

meteo5

 

Prognoza pogody, TVP Kraków też ostrzega przed silnymi wiatrami: http://www.tvp.pl/krakow/pogoda/wideo/prognoza-pogody-dla-malopolski-na-14-kwietnia/14790683

 

A teraz proszę Państwa… wchodzimy do MATRIXA, który nazywa się “Strona internetowa IMGW oraz Internetowy serwis pogodowy IMGW http://www.pogodynka.pl” (a tak przy okazji warto dowiedzieć się co to właściwie jest IMGW oraz jakie ma zadania) :

Poniższe screeny pozostawiam bez komentarza:

meteo2

meteo1

W Krakowie w/g informacji ze strony – spokój i cisza…

meteo3

W Krakowie w/g informacji ze strony – spokój i cisza…

meteo4

W Krakowie w/g informacji ze strony – spokój i cisza…

meteo6

Myszką wskazuję na ikonkę  “silny wiatr… pojawia się mapka i komunikat.. .Że jak ? Wiatr “nie występuje” ?

 

Poniedziałek, 2014-04-14 godzina 13:30.

Za oknem, w północno-wschodniej części Krakowa, właśnie trwa szalony taniec koron drzew, wieku samochodom włączył się autoalarmy, tumany kurzu wzbijają się w powietrze, wiatr “na oko” osiąga ok 90km/h. Ostrzeżeń na stronach IMGW nadal brak….

 

 

Read Full Post | Make a Comment ( None so far )

ZUS i podatki od umowy zlecenia – studium przypadku brutto/netto i terapia szokowa dla pracownika.

Posted on 2014-01-15. Filed under: Uncategorized | Tags: , , , |

Czy podpisując umowę zlecenie zastanawialiście się ile i jakie opłaty/zaliczki/składki pracodawca musi od was zabrać i oddać ZUS’owi i skarbówce ?

Jeżeli nie to zapraszam do zapoznania się z poniższym screenem, który sporządziłem w programie księgowym podczas wystawiania rachunku pracownikowi na umowę zlecenie (zlecenie na 50zł brutto).

Uświadamiające – a dla pracownika szokujące – gdy na koncie pojawia mu się 31zł z umowy zawartej na 50zł.

Pracownik otrzymał 60% kwoty a 40% poszło w kosmos do czarnej dziury.  Surprise!

 

umowa-zlecenie-brutto-netto

Read Full Post | Make a Comment ( None so far )

Feeding SightHound with the MOV files over network (or localhost)

Posted on 2014-01-02. Filed under: Uncategorized | Tags: , , , , |

SightHound (formerly known as Vitamin D Inc) is great piece of software which I use for surveillance /security purposes.

SightHound can hook up to the USB camera or IP camera (MJPEG, h264 etc.) ,  track objects, trigger events etc.

But sometimes you want to detect objects (people, cars etc.) and the only thing you have is the “offline recording” (usually AVI or MOV file).

Here’s how you can use the power of the motion/object detection of the SightHound:

1) Use the VLC (videolan.org) player to stream files at localhost (http://127.0.0.1/)

2) Setup SightHound to use the stream as “fake” IP camera

Here it goes:

1) Setup VLC to stream the file over the network:

“c:\Program Files (x86)\VideoLAN\VLC\vlc.exe” “file:///c:/MINI0112.MOV” “:sout=#transcode{acodec=none}:duplicate{dst=http{mux=ffmpeg{mux=flv},dst=:8080/},dst=display}” “:sout-keep”

2) SightHound configuration to capture the stream:

 

 

 

sight

 

Hopefully it will work for you :-)

 

Read Full Post | Make a Comment ( None so far )

“Bezpłatne” świadczenia NFZ , czyli robienie ludziom wody z mózgu ?

Posted on 2013-12-05. Filed under: Uncategorized | Tags: , , |

Ta nieprawdziwa informacja na stronach NFZ spowodowała, że aż się zagotowałem:

nfz

Źródło: http://www.nfz-krakow.pl/stronadlapacjenta/index.php?site=art&idd=&ida=49

Naprawdę ? Ktoś tutaj chyba bezczelnie kłamie! Jeżeli chodzi o wydatki z wielkiego ciemnego wora zwanego budżetem państwa to NIE MA takich rzeczy jak “bezpłatne” bo ktoś zawsze za to musi zapłacić. Tak tak , drogi podatniku.

Fakty są takie:

Tak więc płać i płacz, ku chwale ojczyzny !

Untitled-1

Read Full Post | Make a Comment ( None so far )

ZUS komiksowo – z konsultantem na czacie.

Posted on 2013-11-07. Filed under: Uncategorized, zus | Tags: |

demot-zus-pytanie-v01

zus-komiks-1

Read Full Post | Make a Comment ( None so far )

« Previous Entries

Liked it here?
Why not try sites on the blogroll...