Onedrive 文件同步
# Onedrive 文件同步
github 地址 (opens new window)
ubuntu 20.04 安装方法 (opens new window)
使用方法 (opens new window)
配置文件
~/.config/onedrive/config
配置示例
# Configuration for OneDrive Linux Client # This file contains the list of supported configuration fields # with their default values. # All values need to be enclosed in quotes # When changing a config option below, remove the '#' from the start of the line # For explanations of all config options below see docs/USAGE.md or the man page. # sync_dir = "~/OneDrive" skip_file = "~*|.~*|*.tmp" monitor_interval = "20" skip_dir = "*/_book|*/node_modules|*/.cache|*/.git|*/dist" log_dir = "/var/log/onedrive/" drive_id = "" upload_only = "false" check_nomount = "false" check_nosync = "false" download_only = "false" disable_notifications = "false" disable_upload_validation = "false" enable_logging = "false" force_http_2 = "false" local_first = "false" no_remote_delete = "false" skip_symlinks = "false" debug_https = "false" skip_dotfiles = "false" dry_run = "false" min_notify_changes = "5" monitor_log_frequency = "5" monitor_fullscan_frequency = "10" sync_root_files = "false" classify_as_big_delete = "1000" user_agent = "" remove_source_files = "false" skip_dir_strict_match = "false" application_id = "" resync = "false" bypass_data_preservation = "false" azure_ad_endpoint = "" azure_tenant_id = "common" sync_business_shared_folders = "false" sync_dir_permissions = "700" sync_file_permissions = "600" rate_limit = "104857600"
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44注意
resync = "true"
每次会放弃之前的同步状态,重新同步文件- 重新开机后,可能会导致出现很多同步冲突
- 一般不要开启
启动方法
- 按此方法,会设置为开机启动
systemctl --user enable onedrive
systemctl --user start onedrive
1
2
2
查看日志文件
journalctl --user-unit=onedrive -f
1
只同步相应的文件夹
- 在
~/.config/onedrive/sync_list
中设置- 不支持中文 ⚠️
- 修改此文件后
- 使用命令
systemctl --user stop onedrive
停止应用- 最好等现在所有的文件同步完成后再停止,不然可能出现同步冲突
- 使用命令
onedrive --synchronize --resync
来使配置生效- 同步完成后可强制中止指令
- 通过
systemctl --user start onedrive
来启动onedrive
, 以让其在后台运行
- 使用命令
编辑 (opens new window)
上次更新: 2022/02/19, 13:02:00