Nhảy đến nội dung chính

Di Chuyển Dữ Liệu Từ Các Cloud Quốc Tế Về Fstotage

image-1661222094010.png

Chuẩn Bị.

1 Server Linux hoặc 1 PC Windows (Lưu ý server hoặc PC không được tắt trong quá trình di chuyển dữ liệu)

Hướng dẫn thao tác trên server Linux

1. Cài đặt Rclone  (Xem hướng dẫn cài đặt và cấu hình Rclone tại https://docs.fstorage.vn/books/huong-dan-ket-noi-linux-voi-fstorage/page/huong-dan-ket-noi-fstorage-voi-rclone)

2. Cấu hình kết nối Rclone với Cloud.

Mở file rclone.conf trong ./config/rclone/rclone.conf

Add các thông tin tài khoản của 2 cloud

[amazon]
type = s3
env_auth = false
access_key_id = xxxxxxxxxxxxxx
secret_access_key = xxxxxxxxxxxxxxxxxxxxxx
region = xxxx
endpoint = https://s3.amazonaws.com
#location_constraint =
#server_side_encryption =
[Fstorage]
type = s3
env_auth = false
access_key_id = xxxxxxxxxxxxxx
secret_access_key = xxxxxxxxxxxxxxxxxxxxxxx
region = hcm1
endpoint = https://hcm1.fstorage.vn
#location_constraint =
#server_side_encryption =

(Thay đổi Endpoint và region cho phù hơp theo thông tin mà bạn nhận được)


image-1661222977348.png

Kiểm tra kết nối với 2 Cloud

Gõ comamand

rclone lsf Fstorage:

Show ra được Bucket thì đã kết nối thành công với Fstorage

image-1661223087196.png

Tương tự đối với Cloud Amazon

rclone lsf amazon:

Có thể dùng  move, copy hoặc sync để di chuyển dữ liệu. 

Thao tác với command move

 rclone move -P amazon:sss Fstorage:multicloud

image-1661223443185.png

Thao tác với Command Copy

rclone copy -P amazon:sss Fstorage:multicloud

image-1661223687018.png

Thao tác với Command Sync

rclone sync -P amazon:sss Fstorage:multicloud

image-1661223829874.png

Khuyến nghị dùng Sync để không phải di chuyển dữ liệu lại từ đầu khi server bị tắt đột ngột

Hướng dẫn thao tác trên Windows. 

Trên Windows có 2 cách để di chuyển dữ liệu qua lại giữa các Cloud. 

Nếu muốn dùng Commandline thì vẫn có thể dùng Rclone giống như trên Linux hoặc là dùng tool DragonDisk 

Hướng dẫn thao tác với Rclone

1. Cài đặt Rclone trên Windows (xem hướng dẫn tại https://docs.fstorage.vn/books/huong-dan-ket-noi-windows-voi-fstorage/page/ket-noi-fstorage-voi-rclone)

2. Cấu hình kết nối với Cloud

Fstorage

Chạy Command trên Powershell

 .\Downloads\rclone.exe config create Fstorage s3 env_auth false access_key_id xxxxxxxxxxxxxx secret_access_key xxxxxxxxxxxxxxxxxxxxx region hcm1 endpoint https://hcm1.fstorage.vn


image-1661224782896.png

Amazon

.\Downloads\rclone.exe config create Amazon s3 env_auth false access_key_id xxxxxxxxxxxxxxxxxxxxx secret_access_key xxxxxxxxxxxxxxxxxxxx region ap-southeast-1 endpoint https://s3.amazonaws.com

image-1661224880641.png

Kiểm tra kết nối với Fstorage

Gõ Command:

.\Downloads\rclone.exe lsf Fstorage:

image-1661225004692.png

Các thao tác di chuyển move, copysync

Thao tác với command move

.\Downloads\rclone.exe move -P  Amazon:sss Fstorage:multicloud

image-1661225151166.png

Thao tác với Command Copy

.\Downloads\rclone.exe copy -P  Amazon:sss Fstorage:multicloud

image-1661225229324.png

Thao tác command Sync

 .\Downloads\rclone.exe sync -P  Amazon:sss Fstorage:multicloud

image-1661225320621.png

Hướng dẫn thao tác với tool DragonDisk

1. Hướng dẫn cài đặt DragonDisk (Xem hướng dẫn cài đặt DragonDisk tại https://docs.fstorage.vn/books/huong-dan-ket-noi-windows-voi-fstorage/page/ket-noi-fstorage-voi-dragondisk)


2. Các thao tác trên DragonDisk.

Cấu hình kết nối tài khoản Fstorage

image-1661225820486.png

Cấu hình kết nối tài khoản Amazon

image-1661225999548.png

Sau khi hoàn thành kết nối 2 tài khoản Cloud

image-1661226068649.png

Chọn Cloud cho 2 Expolorer

image-1661226150195.png

image-1661226180613.png

Để di chuyển dữ liệu chỉ cần kéo thả qua lại giữa 2 explorer

Hoặc tạo Job để đồng bộ

image-1661226442050.png

Bấm Add để tạo mới Job

image-1661226484221.png

Chọn Source và Target

image-1661226585797.png

Sau khi hoàn thành tạo Job

image-1661226640767.png

Bấm vào Job để chạy đồng bộ

image-1661226782506.png