rsync to backup your home directory and mysql databases.
Run the below rsync command using “nohup”, nohup runs a command immune to hangups, with output to a non-tty.
Rsync your home directory’s to your backup server.
Replace $IP with the IP address for your production server.
Run the below commands from your backup server.
#rsync -vrplogDtH –exclude=virtfs/ –progress -e ssh root@$IP:/home/ /home/
rsync all mysql databases.
#rsync -vrplogDtH –progress -e ssh root@$IP:/var/lib/mysql/ /var/lib/mysql/
Backup DB server_support
rsync -vrplogDtH –progress -e ssh root@$IP:/var/lib/mysql/server_support /var/lib/mysql/
Restrict users to their home directory in VSFTP
Sometimes you may want to restrict users to their home directory while doing FTP. You can achieve this in VSFTP with the following steps.
1. Open the VSFTPD configuration file “/etc/vsftpd.conf” . Uncomment the following lines.
chroot_local_user=YES
chroot_list_file=/etc/vsftpd.chroot_list
2. Create the file “/etc/vsftpd.chroot_list” and place the user names (one per line) that you want to restrict in that file.
3. Restart VSFTPD to take effect.
/etc/init.d/vsftpd restart
After this users listed in the file “/etc/vsftpd.chroot_list” will be locked up in their home directory.