Knowledgebase

Portal Home > Knowledgebase > Articles Database > vps backup and log clearing


vps backup and log clearing




Posted by blackandwhite2, 01-15-2016, 06:34 AM
Hi, My brother left at uni and since he's busy he left me a vps server that is paid for a 2 years period to learn my way with it. I've managed so far to find a panel and install it ( webuzo ) and I like it since it's free and provides one click installer. But this is not bragging about what I can do, so I'll go straight to the questions: 1) How can I backup the VPS ( it's using openvz and centos 6 ) ? I've read this tutorial : it's the webshostingtalk domain/showthread.php?t=1130207 but I'm not sure how I can do a complete backup, including the MySQL database and everything that is required to do a full restore. Also I was wondering if it would be possible to store the backup image in something like mega.co.nz ? I know I'm asking to much and I should pay for it but I'm looking for an option similar to the backup in the openvz section. 2) What maintenance do I have to do from time to time especially regarding the logs clearing? I'm doing only yum update now. I've found this thread: it's the webshostingtalk domain /showthread.php?t=1143049&p=8051455&highlight=clear+logs+centos#post8051455 but I'm not clear I just go and delete all the files inside the : /var/logs or just run the command: # rm -f ~/.bash_history # history -c If both are incorrect can I just clear logs from ssh with a command? Thank you and sorry for the newbie questions, I'm new to this.

Posted by anuja9991, 01-15-2016, 07:08 AM
1) How can I backup the VPS - This can be accomplished two way. If you want to full restore then you will have to ask your VPS provider to do full backup for your VPS since you cant really do it at your end. If you simply want to do backups for the website hosted insider your vm, you can use webuzo auto backup feature. If you using installed script over webuzo you can create and set auto backups : Login in Webuzo > Scripts > All Installations You will see a option right side on Installations scrips : " Backups" and "Edit Details " Backups : you can create backup Edit Details : you can setup automatic daily backup All the backups files will be store in Backup menu and you can restore it when needs. 2)I would suggest not to delete any logs unless you run out of the disk space. If you run out of the disk and logs are using most of the disk space, what i would do is backup latest logs i.e. atleast last 15-30 days and then remove older one. You still need to do a lot of homework before you actually start deleting anything in the server.

Posted by Srv24x7, 01-15-2016, 10:27 AM
What website do you wish to backup? What are the areas where the data is stored on your server ? The search for the backup is dependent but not limited to these questions. If you have a wordpress site, you can install a plugin to take a backup of the site to Google drive or any other too if you want. May I know what areas on your server you are looking to be backed up? Yum update will make sure that the packages installed on the server are up-to-date. Log management is a different part. On a regular basis, you should just be auditing the disk space utilization and based on things are audited like error_logs, etc. System logs already has an inbuilt rotatory system enabled, so the logs are rotated on a regular interval. You have to make sure what logs you are clearing. Go to the /var/log folder and do a listing and check their size first and do the needful accordingly.

Posted by blackandwhite2, 01-16-2016, 09:05 PM
Tunevps thank you for the answers. Srv24x7 thank you for the answers. I'm trying to backup the whole image, like the one that's installed inside the openvz, not just a website hosted on it. And one more question for both of you: I'm also trying to read about vps security and upon reading the forum I found information about the mod_security and OSSEC , I understand that mod_security is kind of a firewall with some basic rules that I just plug and play while OSSEC will not protect anyting just notify me of the file modifications made? My vps is not so powerful 2 x 3,5ghz and 2 gb ram, so I don't know what would best be suited to install? Unfortunately I can't afford to buy something premium, this vps that I got is just for learning and I'm enjoying the paid time I got on it.

Posted by Srv24x7, 01-17-2016, 07:20 AM
This can be done in 2 ways: 1) If are a VPS provider, you can take an online snapshot of your machine on a daily basis. 2) If you are only an end user that is using OpenVZ VPS, you can check the option of R1 soft, which actually images your server complete. Application of modsecurity has least affect on the hardware. When you implement ModSecurity, you got to be aware of false positive alerts too. Modsecurity keeps a track of online activity and blocks the one that are violating its set of rules. You can find many free modsecurity rules too.

Posted by blackandwhite2, 01-18-2016, 06:01 PM
Thank you again for your answer. Will I still need to implement an intrusion detection system along this or modsecurity is enough? If an intrusion system is required can you recommend a free one?

Posted by Srv24x7, 01-19-2016, 04:16 AM
Hi, Modsecurity does good blocking the attack to a particular extend. However, if you can have an online scanner to scan the actual content that is being passed over the web traffic. CXS is good in the section to scan the traffic and files that are uploaded. However, CXS is a paid one. If you want to go with a basic scanner mechanism, you can use maldet along with modsecurity to scan the contents.



Was this answer helpful?

Add to Favourites Add to Favourites    Print this Article Print this Article

Also Read
Backup? (Views: 611)
Why IPowerWeb? (Views: 541)


Language:

Contact us