Posts

Showing posts with the label Backup

Google Drive backup on Linux Mint 19

Image
บน OS อื่น Google มี Official App สำหรับช่วย Backup และ Sync ข้อมูลใน Google Drive ตามนี้  https://www.google.com/drive/download/backup-and-sync/  แต่ฝั่ง Linux ยังไม่มี จึงต้องอาศัยตัวช่วยอย่างไม่เป็นทางการได้แก่ rclone ( https://rclone.org/ ) ซึ่งไม่จำกัดแค่ Google Drive เพราะคุณสมบัติของเขาคือ rsync for cloud storage  รองรับ cloud หลายยี่ห้อมาก 1.ติดตั้ง 1.1 App หลัก : apt install rclone 1.2 GUI :  https://www.ubuntuupdates.org/package/webupd8/bionic/main/base/rclone-browser 2.ใช้งาน 2.1 เรียกใช้งานผ่าน Rclone Browser โดยเริ่มจากการ config ซึ่งจะเรียก CLI ขึ้นมาอีกที ดังนี้ n) New remote r) Rename remote c) Copy remote s) Set configuration password q) Quit config n/r/c/s/q> n name> Google Drive Type of storage to configure. Choose a number from below, or type in your own value  1 / Amazon Drive    \ "amazon cloud drive"  2 / Amazon S3 (also Dreamhost, Ceph, Minio)    \ "s3"  3 / Backblaze B2 ...

Ubuntu : Backup & Restore

คำสั่ง mt (Magnatic Tape) ปกติระบบจะ mount ไว้ให้ที่ /dev/st0 mt -f /dev/st0 status # ตรวจสอบสถานะ mt -f /dev/st0 rewind # สั่งหมุน tape กลับ mt -f /dev/st0 erase # ลบข้อมูล (นานมาก) mt -f /dev/st0 offline #สั่งเด้ง tape ออก Cleaning Cartridge # บางรุ่นอาจไม่เหมือนกัน ใส่เข้าไป พอมัน load เข้าไปแล้วทำความสะอาดเสร็จจะเด้งออกมาเอง (Cleaning Cartridge เป็นแบบใช้แล้วใช้เลย rewind กลับมาใช้อีกไม่ได้) คำสั่ง Backup & Restore Backup ใช้ -c tar -cvf backup_filename data_to_backup เช่น tar -cvf backup.tar /home/nikom กรณีต้องการให้บีบอัดไฟล์ด้วย เพิ่ม parameter -z tar -cvzf backup.tar.gz /home/nikom Restore เปลี่ยน -c เป็น -x (เข้าไปใน directory ที่จะ restore ก่อน เพราะสั่งตรงไหน restore มาตรงนั้น) tar -xvf backup_filename เช่น tar -xvf backup.tar restore ไฟล์ที่บีบไว้ ใช้ -z เหมือนกัน tar -xvzf backup.tar.gz Tape backup ลง tape tar -cvf /dev/st0 data_to_backup ดูรายการใน tape tar -tvf /dev/st0 restore จาก tape tar -tvf /dev/st0 backup_filename backup & restore กับ tape ก็ใช้ -z สำห...