다운로드 링크가 정상적으로 보이지 않는 경우 애드블록을 해제해 주세요.
본문 바로가기
  • 혜음우리말화연구소
잡동사니/기타 프로젝트

Rclone을 이용해서 원드라이브간에 파일 이동

by WindowsTiger 2024. 1. 19.

안녕하세요 WindowsTiger입니다.

 

작년 11월쯤에 MS는 그동안 대학에 무료로 제공하고 있던 학생당 1TB 의 onedrive 공간을 회수하고 대학에서 유료로 사야되는 정책을 내놓았습니다. 이 때문에 평생 무료인것 처럼 정책을 펼치던 MS의 말갈아엎기 행보를 비판하는 목소리도 있었죠.

어쨌든 저희학교는 따로 공지사항이 없기 때문에 대학에서 유료로 결제하려나 하고 생각해고 있었는데, 아니이게 왠걸 올해 2월까지 용량을 전부 다 정리해달라는 공지가 떴네요. 학생당 0GB로 완전히 회수하겠다고 공지를 내렸습니다.

 

https://www.microsoft.com/ko-kr/microsoft-365/college-student-pricing

 

Office, Word의 Microsoft 학생 할인 | Microsoft 365

Microsoft Word, PowerPoint, Excel, Teams, OneDrive와 같은 Office 앱에 대학생 할인을 받고 1TB의 클라우드 저장소도 이용할 수 있으며 이 모두가 하나의 저렴한 가격으로 제공됩니다.

www.microsoft.com

 

그래도 onedrive는 학생인증만 하면 월 3900원이라는 구글클라우드 200GB 요금제와 비슷한 가격으로 1TB용량을 제공하고 있습니다. 그래서 이걸 바로 결제했죠. 근데 돈은 문제가 안되는데 진짜 문제는 원래 onedrive 에 있는 정보를 어떻게 다 백업을 하느냐입니다. onedrive에 저장된 데이터가 800GB에 육박하는 저로써는 이 모든 데이터를 다시 PC로 내려받은뒤 다른 onedrive 로 백업을 하기에는 onedrive가 너무 느리단 말이죠. 또 대학 원드라이브는 비지니스용 원드라이브로 취급되어서 개인용 원드라이브로 마이그레이션을 공식적으로 지원하지 않습니다.

 

따라서 해당방법을 찾게 되었고 여기서는 rclone을 이용하여 원드라이브간에 파일을 옮기는 방법을 공유합니다.

 

 

rclone은 거의 모든 클라우드 서비스(메가라던지 onedrive라던지 구글 클라우드라던지)를 전부 한번에 관리할수 있는 강력한 툴입니다.

대부분은 윈도우를 사용할테니 해당 링크해서 Windows용을 자신의 컴퓨터에 맞게 다운로드 해주면 됩니다.

 

https://rclone.org/downloads/

 

Rclone downloads

© Nick Craig-Wood 2014-2024 Source file downloads.md last updated 2023-09-11 Uploaded with rclone. Built with Hugo. Logo by @andy23. Served by Caddy. Hosted at Hetzner Cloud.

rclone.org

 

압축을 풀면 다음과 같이 프로그램이 나옵니다. 아쉽게도 우리는 여기서 명령 크롬프트로 작업을 해야합니다.

shift를 누른상태로 rclone이 있는 창에서 우클릭을 해서 여기에 powershell창 열기를 합니다. 그다음 cmd를 치면 명령 크롬프를 열수 있습니다.

rclone config
No remotes found, make a new one?
n) New remote
s) Set configuration password
q) Quit config
n/s/q> n

여기서 'rclone config'를 누르면 새 저장소를 연결할지를 묻습니다. 여기서 n을 눌러줍니다.

 

Enter name for new remote.
name> onedrive_personal

새 저장소의 별명을 묻는 곳입니다.

저는 'onedrive_personal'이라고 작성했습니다.

 

Option Storage.
Type of storage to configure.
Choose a number from below, or type in your own value.
 1 / 1Fichier
   \ (fichier)
 2 / Akamai NetStorage
   \ (netstorage)
 3 / Alias for an existing remote
   \ (alias)
 4 / Amazon Drive
   \ (amazon cloud drive)
 5 / Amazon S3 Compliant Storage Providers including AWS, Alibaba, ArvanCloud, Ceph, ChinaMobile, Cloudflare, DigitalOcean, Dreamhost, GCS, HuaweiOBS, IBMCOS, IDrive, IONOS, LyveCloud, Leviia, Liara, Linode, Minio, Netease, Petabox, RackCorp, Rclone, Scaleway, SeaweedFS, StackPath, Storj, Synology, TencentCOS, Wasabi, Qiniu and others
   \ (s3)me
56 / seafile
   \ (seafile)
Storage> onedrive

저장소의 종류를 묻는 곳입니다. 양에 압도되지 말고 우리는 onedrive를 쓸거니 onedrive라고만 치면 됩니다. 다른 드라이브를 원하면 찾아서 입력하시면 됩니다.

 

Option client_id.
OAuth Client Id.
Leave blank normally.
Enter a value. Press Enter to leave empty.
client_id>

Option client_secret.
OAuth Client Secret.
Leave blank normally.
Enter a value. Press Enter to leave empty.
client_secret>

API 코드 입력하는 곳입니다. 우리는 여기서 무시하고 그냥 엔터만 눌러서 넘어가시면 됩니다

 

Option region.
Choose national cloud region for OneDrive.
Choose a number from below, or type in your own string value.
Press Enter for the default (global).
 1 / Microsoft Cloud Global
   \ (global)
 2 / Microsoft Cloud for US Government
   \ (us)
 3 / Microsoft Cloud Germany
   \ (de)
 4 / Azure and Office 365 operated by Vnet Group in China
   \ (cn)
region> global

원드라이브의 지역을 묻는 곳입니다. 한국에서 다니는 학생이라면 무조건 'global'을 입력해주시면 됩니다.

 

Edit advanced config?
y) Yes
n) No (default)
y/n> n

고급설정을 할지 묻고있습니다. y하면 이상한걸 물으니 n눌러서 넘어가 주세요.

 

Use web browser to automatically authenticate rclone with remote?
 * Say Y if the machine running rclone has a web browser you can use
 * Say N if running rclone on a (remote) machine without web browser access
If not sure try Y. If Y failed, try N.

y) Yes (default)
n) No
y/n> y

2024/01/18 19:38:26 NOTICE: If your browser doesn't open automatically go to the following link: http://127.0.0.1:53682/auth?state=8x4c7OJzv-A4QHlIc39RWQ
2024/01/18 19:38:26 NOTICE: Log in and authorize rclone for access
2024/01/18 19:38:26 NOTICE: Waiting for code...
2024/01/18 19:38:51 NOTICE: Got code

인증을 자동으로 할건지 묻고있습니다. 우리는 y를 누르시면 창이 뜨면서 원드라이브 권한요청창이 뜹니다. 

 

여기서 동의함을 눌러서 권한을 얻어오시면 됩니다. 참고로 원드라이브를 2개 이상 연결할때 자동으로 로그인을 켜두면 다른 계정을 연결하기 불편하기 때문에 해당 옵션을 꺼주세요. 또한 그래도 자동으로 로그인되면 하나 연결후, 브라우저를 다 끄고 하시는게 좋습니다.

 

Option config_type.
Type of connection
Choose a number from below, or type in an existing string value.
Press Enter for the default (onedrive).
 1 / OneDrive Personal or Business
   \ (onedrive)
 2 / Root Sharepoint site
   \ (sharepoint)
   / Sharepoint site name or URL
 3 | E.g. mysite or https://contoso.sharepoint.com/sites/mysite
   \ (url)
 4 / Search for a Sharepoint site
   \ (search)
 5 / Type in driveID (advanced)
   \ (driveid)
 6 / Type in SiteID (advanced)
   \ (siteid)
   / Sharepoint server-relative path (advanced)
 7 | E.g. /teams/hr
   \ (path)
config_type> 1

onedrive의 정확한 종류를 묻는 곳입니다. 우린 그냥 onedrive니까 '1'을 입력하면 됩니다.

 

Option config_driveid.
Select drive you want to use
Choose a number from below, or type in your own string value.
Press Enter for the default (23897b89739b238).
 1 /  (personal)
   \ (23897b89739b238)
config_driveid> 1

Drive OK?

Found drive "root" of type "personal"
URL: https://onedrive.live.com/?cid=23897b89739b238

y) Yes (default)
n) No
y/n> y

Configuration complete.
Options:
- type: onedrive
- token: {"access_token":"orvfilvobrvoewbowvb98vr9b8a3ar-03rn0a2-vr093orvfilvobrvoewbowvb98vr9b8a3ar-03rn0a2-vr093orvfilvobrvoewbowvb98vr9b8a3ar-03rn0a2-vr093orvfilvobrvoewbowvb98vr9b8a3ar-03rn0a2-vr093orvfilvobrvoewbowvb98vr9b8a3ar-03rn0a2-vr093orvfilvobrvoewbowvb98vr9b8a3ar-03rn0a2-vr093orvfilvobrvoewbowvb98vr9b8a3ar-03rn0a2-vr093orvfilvobrvoewbowvb98vr9b8a3ar-03rn0a2-vr093orvfilvobrvoewbowvb98vr9b8a3ar-03rn0a2-vr093orvfilvobrvoewbowvb98vr9b8a3ar-03rn0a2-vr093orvfilvobrvoewbowvb98vr9b8a3ar-03rn0a2-vr093orvfilvobrvoewbowvb98vr9b8a3ar-03rn0a2-vr093orvfilvobrvoewbowvb98vr9b8a3ar-03rn0a2-vr093orvfilvobrvoewbowvb98vr9b8a3ar-03rn0a2-vr093orvfilvobrvoewbowvb98vr9b8a3ar-03rn0a2-vr093orvfilvobrvoewbowvb98vr9b8a3ar-03rn0a2-vr093orvfilvobrvoewbowvb98vr9b8a3ar-03rn0a2-vr093orvfilvobrvoewbowvb98vr9b8a3ar-03rn0a2-vr093orvfilvobrvoewbowvb98vr9b8a3ar-03rn0a2-vr093","token_type":"dffdsfsd","refresh_token":"hacbifewbhcibwhecouhbweicbhihbfwlechioefc","expiry":"2025-05-15T25:35:55.555+55:00"}
- drive_id: 23897b89739b238
- drive_type: personal
Keep this "onedrive_personal" remote?
y) Yes this is OK (default)
e) Edit this remote
d) Delete this remote
y/e/d> y

남은건 정말 이 드라이브를 사용하는지 계속 묻는 곳입니다. '1', 'y', 'y'순으로 넘어가면됩니다.

 

Current remotes:

Name                 Type
====                 ====
onedrive_business    onedrive

이후 이런식으로 뜨면 정상적으로 연결된 것입니다. 한번 더 해서 대학교용 원드라이브랑, 개인 원드라이브 둘다 등록을 해주세요.

이후 ctrl+C를 눌러서 config를 꺼주시면 됩니다.

 

이제 원드라이브 간에 파일을 복사하는 방법입니다.

 

rclone copy -P --transfers 25 --checksum onedrive_business: onedrive_personal:

해당 명령어를 쳐주면 됩니다. 'onedrive_business'랑 'onedrive_personal'은 알아서 이름을 적절히 바꿔주세요. 이러면 대학교 onedrive 파일일 개인 onedrive로 그대로 복사가 됩니다.

 

실제로 복사가 되고있는 장면입니다. 최대속도는 약 30MB/s가 나옵니다만 한 3시간 이후부터는 API 제한때문에 속도가 확떨어지긴 합니다. 그래도 onedrive 동기화를 통해 받는것보다 빠르고 무엇보다, 글자수 제한을 우회할수 있다는 것도 장점인 것같습니다.

만약 급하게 대학 ondrive를 옮겨야한다면 이걸 이용하시는 것을 추천드립니다.

'잡동사니 > 기타 프로젝트' 카테고리의 다른 글

Office 2021 테마 구버전으로 바꾸는 방법  (0) 2023.05.05
FE9ScriptDumper  (0) 2022.08.01
게임보이 합팩 부트롬  (0) 2022.08.01

댓글