2015年2月26日星期四

mongodb backup and restore

# backup
mongodump -h x.x.x.x -d $dbname

# restore
cd dump
mongorestore -h x.x.x.x -d $dbname ./$filepath/

Insert Code With Google Blogger

// Add the code to your template
 
 


Make a vsftp site was not difficult

yum install vsftpd ftp -y

/etc/vsftpd/vsftpd.conf
 [...]
## Set to "NO" ##
anonymous_enable=NO

## Uncomment ##
ascii_upload_enable=YES
ascii_download_enable=YES

## Uncomment - Enter your Welcome message - This is optional ##
ftpd_banner=Welcome to UNIXMEN FTP service.

## Add at the end of this  file ##
use_localtime=YES

service vsftpd restart
chkconfig vsftpd on

useradd bigdataftp
passwd bigdata


listen_port=2121

# use the following to lock user at their own directory
chroot_local_user=YES