อธิบายขั้นตอนการ Suspend Account VPS ด้วยโปรแกรม Virtualizor 1. Login เข้า Control Panel Master Server สำหรับ Virtualizor 2. ไปที่ Virtual Server และ List All 3. ไปที่ VM ที่ต้องการ Suspend 4. ที่ Tools ขวามือ ให้นำเมาท์ไป over ที่รูป และคลิ๊ก Suspend ที่รูป 5. ตรวจสอบ Server ที่ถูก Suspend ต้องไม่สามารถ Access หรือ Ping ได้และต้องขึ้น Status Suspend ดังรูป
อธิบายขั้นตอนการ Unsuspend Account VPS ด้วยโปรแกรม Virtualizor Unsuspend ผ่าน Virtualizor 1. Login เข้า Control Panel Master Server สำหรับ Virtualizor 2. ไปที่ Virtual Server และ List All 3. ไปที่ VM ที่ต้องการ Unsuspend 4. ที่ Tools ขวามือ ให้นำเมาท์ไป over ที่รูป และคลิ๊ก Unsuspend ที่รูป 5. ตรวจสอบ Server ที่ถูก Unsuspend ต้องสามารถ Access หรือ Ping ได้และ Status ดังรูป
โดยปกติเราสามารถตรวจสอบ Process การทำงานได้จาก Master Server Control Panel สำหรับ Virtualizor โดยการไปที่ Master Server Login และไปที่ Logs แต่ในบางกรณีเราไม่สามารถตรวจสอบและวิเคราะห์ปัญหาได้จากที่นี่ จึงต้องใช้วิธีตรวจสอบ Logs ผ่าน Command Line โดยวิธีการดังกล่าวจำเป็นต้องรู้ Logs File Path ทั้ง Master Server และ Slave Server ดังนี้ Master Server Logs #/var/virtualizor/log/virtservice สำหรับตรวจสอบสถานะเมื่อมีการ restart service virtualizor สถานะปกติต้องเป็น Virtualizor Service running properly #/var/virtualizor/log/addvs/{vmid}.log สำหรับ create vm และ error เมื่อ create ไม่สำเร็จ #/var/virtualizor/log/createtemplate.log สำหรับ create และ convert vm เป็น template และ error เมื่อ create ไม่สำเร็จ #/var/virtualizor/log/deletevs/{vmid}.log สำหรับ delete vm และ error เมื่อ delete ไม่สำเร็จ #/var/virtualizor/log/migrate/{vmid}-master.log สำหรับ migrate vm และ error เมื่อ migrate ไม่สำเร็จ #/var/virtualizor/log/rebuild/{vmid}.log สำหรับ rebuild vm และ error หาก rebuild ไม่สำเร็จ #/var/virtualizor/log/sync_config.log สำหรับ sync config ระหว่างเครื่อง Master และ Slave(status ต้องเป็น completed ทุกเครื่อง) Slave Server Logs #/var/virtualizor/log/virtservice สำหรับตรวจสอบสถานะเมื่อมีการ restart service virtualizor logs ปกติต้องเป็น Virtualizor Service running properly #/var/virtualizor/log/virtualizor-backups.log สำหรับ vm backup และ error #/var/virtualizor/log/migrate/{vmid}-xxx.log สำหรับ migrate และ error Path อื่นๆที่จำเป็น #/var/virtualizor/dbbackups เก็บ database backup #/var/virtualizor/iso เก็บ template file .iso #/var/virtualizor/kvm เก็บ template file สำหรับ kvm
เอกสาร: Linux VPS Datasheet อัพเดทล่าสุด : 11/11/2020 ภาษา: ไทย รูปแบบ: PDF Format (2 หน้า) ข้อมูลเกี่ยวกับเอกสาร: สำหรับผู้สนใจทั่วไปและผู้ประกอบการ เกี่ยวกับฟีเจอร์, ฟังก์ชั่นการทำงานและราคาของแพลนต่างๆ ของ Linux VPS เพื่อประกอบการตัดสินใจได้ง่ายขึ้น
การเขียน Script Backup postgresql 1. รันคำสั่ง su - postgres (เพื่อเข้าใช้งาน user : postgres) 2. รันคำสั่ง psql (เพื่อเข้าตรวจสอบ database) 3. รันคำสั่ง \l (เพื่อเข้าดูรายชื่อ database) 4. ดำเนินการเชียนไฟล์ script : backupOdoo.sh ที่ path : /var/lib/postgresql #!/bin/bash #################################### # Backup to NFS mount script. #################################### # Create Folder date. mkdir /var/lib/postgresql/9.6/main/backup_Odoo/$(date +%d-%m-%Y_%H00); # Dump database time. pg_dump -d Database name -f /path ที่ต้องการเก็บไฟล์ Database/ชื่อไฟล์ Database.pgsql; #Remove database 7 day find /var/lib/postgresql/9.6/main/backup_Odoo/ -type f -mtime +7 -exec rm -f {} \; 4. เขียนไฟล์ cronjob : postgres ที่ path : /var/spool/cron/crontabs (เพื่อรันไฟล์ Script ตามที่กำหนดไว้) # DO NOT EDIT THIS FILE - edit the master and reinstall. # (/tmp/crontab.9OXrVx/crontab installed on Fri Jul 10 17:14:55 2020) # (Cron version -- $Id: crontab.c,v 2.13 1994/01/17 03:20:37 vixie Exp $) # Edit this file to introduce tasks to be run by cron. # # Each task to run has to be defined through a single line # indicating with different fields when the task will be run # and what command to run for the task # # To define the time you can provide concrete values for # minute (m), hour (h), day of month (dom), month (mon), # and day of week (dow) or use '*' in these fields (for 'any').# # Notice that tasks will be started based on the cron's system # daemon's notion of time and timezones. # # Output of the crontab jobs (including errors) is sent through # email to the user the crontab file belongs to (unless redirected). # # For example, you can run a backup of all your user accounts # # For more information see the manual pages of crontab(5) and cron(8) # # m h dom mon dow command * * * * * /bin/sh /var/lib/postgresql/backupOdoo.sh