Category Archives: Linux

dump gzip only rowdata to another server

#!/bin/bash # loop isi file well_list.txt # kemudian dump | gzip ke server lain # contoh nama table xx_telo_xx while read p; do mysqldump -uuser -ppassowrd –skip-add-drop-table –skip-add-locks –lock-tables=false namadatabase $(mysql -uuser -ppassowrd -D namadatabase -Bse “SHOW TABLES LIKE ‘%$p\_%’”) | gzip -c | ssh user@servertujuan “cat > /home/user/backupdb-rowdata/only-rowdata_$p.sql.gz” done < well_list.txt

scroll on screen

Control + a , then Escape . After that, you should be able to move your cursor around using the arrow keys

ubuntu set env permanent

sudo vi ~/.profile Add the command to the bottom of the file export PATH=”/home/name/telo/bin:$PATH”  

tunnel

ssh -L 3318:localhost:3306 user@someipaddress ssh -L 2222:ipVpnEpt:22 user@ipnosrtobackup ssh -L *:3318:localhost:3306 -L *:7070:localhost:8080 user@someipaddress

linux mount

sudo mount /dev/sdb1 /media sudo umount /media fdisk -l Device Boot Start End Blocks Id System /dev/sda1 * 63 204796619 102398278+ 7 HPFS/NTFS /dev/sda2 204797952 205821951 512000 83 Linux /dev/sda3 205821952 976773119 385475584 8e Linux LVM sudo mount -t ntfs /dev/sda1 /media USB devices are usually vfat and Linux are usually ext sudo mount -t… Read More »

redirect port pada linux menggunakan redir

system@test:~$ redir usage: redir –lport= –cport= [options] redir –inetd –cport= Options are:- –lport= port to listen on –laddr=IP address of interface to listen on –cport= port to connect to –caddr= remote host to connect to –inetd run from inetd –debug output debugging info –timeout= set timeout to n seconds –syslog log messages to syslog –name=… Read More »