Có gì mới?
Việt Game - NET

This is a sample guest message. Register a free account today to become a member! Once signed in, you'll be able to participate on this site by adding your own topics and posts, as well as connect with other members through your own private inbox!

Chia sẻ Backup/restore file lên onedrive

Minh Trí

Administrator
Tham gia ngày
03/12/2013
Bài viết
3.557
Reaction score
1.140
Điểm
50
Tải file này về chép rclone .exe vô ổ C của máy tính (Windows nhé).
Hidden Content
Please log in or register to view this content.

Bạn không được cấp quyền để xem nội dung ẩn.

Trên linux, gõ:
rclone config
Mã:
Storage> 23
** See help for onedrive backend at: https://rclone.org/onedrive/ **

Microsoft App Client Id
Leave blank normally.
Enter a string value. Press Enter for the default ("").
client_id>
Microsoft App Client Secret
Leave blank normally.
Enter a string value. Press Enter for the default ("").
client_secret>
Edit advanced config? (y/n)
y) Yes
n) No (default)
y/n> n
Remote config
Use auto config?
 * Say Y if not sure
 * Say N if you are working on a remote or headless machine
y) Yes (default)
n) No
y/n> n
For this to work, you will need rclone available on a machine that has a web browser available.
Execute the following on your machine (same rclone version recommended) :
        rclone authorize "onedrive"
Then paste the result below:
result>
Mở CMD (trên win) chuyển về C:\ rồi gõ:
C:\rclone.exe authorize "onedrive"
Nó sẽ bật trình duyệt và bảo bạn login tài khoản Onedive (trước khi làm login sẵn đi): trên trình duyệt báo:

Success!​

Là được. Quay về CMD copy đoạn code Có dạng này
{"access_token":"e..................................................................09.1604512+07:00"}
<---End paste
Dán vô linux, chọn Y rồi chọn Q (thoát) là được.
Đoạn code để tải lên:
Mã:
echo "Đang upload lên One Drive";
 /usr/sbin/rclone --transfers=1 move $BACKUP_DIR "onedrive:Backup/sql/$TIMESTAMP2/$TIMESTAMP1/$TIMESTAMP/sync" >> /var/log/rclone.log 2>&1
Trong đó, onedrive là tên lúc bạn vừa tạo ở config.
 

Top Bottom