It is a error when I tried to connect an FTP server by LFTP tool.
Fatal error: Certificate verification: Not trusted
I did a search on Google and find the answer.
There is self signed certificates which is used by TLS on a ftp connection. It is not trused and error comes.
Of course, the connection is closed on error, and no more further put or get command can be used.
To bypass this message, or ignore this error, add following content in a file ~/.lftp/rc
set ssl:verify-certificate no
Previously I used gzip as compression tool to compress the web site files and mysql database. It is still working on my Linode server. I learned something from the compairasion from this post .
So I tried to use bzip instead of gzip on my backup script.
Here is two examples.
1) Mysqldump file, which is a text sql file.
The original sql file is 52,317KB
- gzip with level 9 (best) compression: 23,227KB – Compress Ratio 44.39%
- bzip2 with default (I think it is level 9) compression: 19,666KB – Compress Ratio 37.59%
Bzip2 is smaller than gzip file. It reduced about 15%.
2) Website files, including php, jpeg, png, css, any files used in web site.
The original tar gile is 187,670KB
- gzip compression: 42,101KB – Ratio 22.43%
- bzip2 compression: 34,753KB – Ratio 18.51%
Bzip2 is better. Backup file size is reduced by about 17%.
Continue reading “Switch to bzip2 compression on my server backup scripts”
I have a VPS powered by Centos 5.2.
There are some very important forum on it. I would like to backup it every day.
Now because HyperVM/LxAdmin – Backup Home, can not backup MySQL or not easy to get it. I have to write the shell script to do the backup job.
To use the FTP I need lftp tool.
The whole picture looks like below.
1) Dump all MySQL databases and compress them, save them in /home/usera/backup/mysql/
2) FTP them to Backup server of Dreamhost at /vps-backup/mysql/
3) Remove the backup files 4 days old.
You have to use your own account name and password.
usera is my sample user name. You can also use any other FTP server to save your offsite backups.
You make a file under /home/usera/mysql.backup.sh
Put the content below in it, save and make it executive.
Continue reading “Schedule Backup MySQL database and FTP offsite in Centos”