Technology

Minibian – Minimal Reliability Setup

apt-get update
apt-get install nano
apt-get install mc
apt-get install -y raspi-config
raspi-config
# Expand Filesystem
# Reboot

apt-get -y upgrade
reboot

apt-get install -y rpi-update sudo
rpi-update
reboot

# for fsck.vfat fix tweak (to check and fix /boot, it’s FAT file system)
apt-get install dosfstools

# Create Default User pi
adduser pi
# Enter Password as wanted, i.e. raspberry
# Add user to default groups
usermod -a -G pi,adm,dialout,cdrom,audio,video,plugdev,games,users pi
# Add sbin Paths to pi
echo ‘export PATH=”$PATH:/sbin:/usr/sbin:usr/local/sbin”‘ >> /home/pi/.bashrc
# Add user to sudo
visudo
# Add under
# # User privilege specification
# root ALL=(ALL:ALL) ALL
pi ALL=(ALL:ALL) ALL
# Save and Exit
reboot

# Disable root login
sudo passwd -l root

apt-get install localepurge
localepurge

nano /etc/default/rcS
# delete files in /tmp during boot older than x days.
# ‘0’ means always, -1 or ‘infinite’ disables the feature
TMPTIME=0
# automatically repair with inconsistencies during boot
FSCKFIX=yes

nano /etc/rc.local
# automatically check filesystems every boot
touch /forcefsck
exit 0

 

 

Reference : the web..

Technology

Raspberry Pi – Online/Hot/Live Backup to FTP Server

Install Curl via FTP File system and make dir to mount:

apt-get install curlftpfs
mkdir /media/server

MOUNT ftp File system to dir:

curlftpfs -o allow_other -o umask=000 user:password@192.168.1.31 /media/server

Execute backup all file system to ftp in image file:

dd bs=1M if=/dev/mmcblk0 of=/media/server/rasp-smartgrid-tf-05-08-2015-OK.img

Description :
ftp server : 192.168.1.31
ftp username : user
ftp password : password
ftp mount point : /media/server
input file : /dev/mmcblk0 (which is the sd card partition)
output file : /media/server/rasp-smartgrid-tf-05-08-2015-OK.img