Categories
System/Linux/Unix*

Use dd command to backup whole disk to image file , acer desktop , win7

Acer ASPIRE M1930 partition layout

Same PC but install windows7

 


-- OK! 在 virtualbox 測試
dd if=/dev/sda | pv | ssh -p 2200 rimmon@london.monster.tw 'cat > winxp2.dd.img'
ssh -p 2200 rimmon@london.monster.tw 'cat winxp2.dd.img' | pv | dd of=/dev/sda

-- OK! 把 Acer PC 整個硬碟備份到遠端 server 的 image file
dd if=/dev/sda | pv | ssh -p 2200 rimmon@london.monster.tw 'cat > /mnt/m1/acer-pc-win7.dd.img'

-- OK!把 Acer PC 改裝 windows7 後, 備份到遠端 server
-- 用 pv 看進度 , pipe 給 gzip 壓縮後再透過 ssh 傳到遠端 server ,
dd if=/dev/sda | pv | gzip | ssh -p 2200 rimmon@london.monster.tw 'cat > /mnt/m1/desktop-win7.dd.img.gz'

976773168+0 records in
976773168+0 records out
500107862016 bytes (500 GB, 466 GiB) copied, 12321.3 s, 40.6 MB/s

94G     desktop-win7.dd.img.gz


Categories
System/Linux/Unix*

[note] Ubuntu 18.04 IP address setup , resolv

 

Categories
Copy_N_Paste Programming/php

[PHP] Native SQLRELAY connect / query sample code

Categories
Copy_N_Paste Network service Uncategorized

[docker] 用 docker 建立 ipsec vpn server


URL: https://github.com/hwdsl2/docker-ipsec-vpn-server

#
docker run \
    --name ipsec-vpn-server \
    --env-file ./vpn.env \
    --restart=always \
    -p 500:500/udp \
    -p 4500:4500/udp \
    -v /lib/modules:/lib/modules:ro \
    -d --privileged \
    hwdsl2/ipsec-vpn-server
#
# docker logs ipsec-vpn-server
# docker exec -it ipsec-vpn-server ipsec status
# docker exec -it ipsec-vpn-server ipsec whack --trafficstatus
Categories
Network service System/Linux/Unix*

ssh backup command

tar zcvf – KeepTheseFiles | ssh user@desthost ‘cat > KeepTheseFiles.tgz’

Categories
Exercise

2018.0603 烏石港海泳, 完成時間1小時11分

烏石港海泳 氣/水溫=26 小浪0.8M ,  8:33下水

Categories
Uncategorized

ESP8266 ESP-12F , pin out , test

Categories
hardware Iot Network service Software

My Solar Powered Weather Station (WiFi,BMP180,DHT22,Deep sleep mode)

Categories
hardware Iot

Nodemcu mini d1 / Wemos mini d1 pinout

Categories
Uncategorized

ESP-01S pinout / 燒錄