终于搞定了群晖里的照片自动上传到 Google photos,也给大家分享一下。
本 docker 实现的功能:
如何安装:
docker pull muyouming/gphotosuploader
get google cookie by using chrome extension by refer to here.
run docker in privillage mode, and set the photo folder to /photo.
input the cookie string in docker env COOKIES
if proxy needed ,please change the docker enviroments SOCKS5_PROXY to your proxy, if no proxy needed ,pease delete the enviroments http_proxy and https_proxy.
run ,and this uploader will monitor all changes in your /photo folder, and upload to your google photo storage. if you see "Watching " in log ,it means everything works right.
if this folder is new and you needto upload all, you can go to the terminal and start a bash ,then execute: gphotosuploader --upload /photo --maxConcurrenct 4 this comamnd will upload all your photos and videos in /photo .
enjoy.
不知道怎么发图,请大家移步 github 去看有图的说明:
https://github.com/muyouming/gphotosuploader/tree/master/docker
目前已经测试 2 天,没发现什么大的 bug。欢迎大家吐槽。
1 wmwwmv 2018-12-24 21:07:55 +08:00 不错,有自动同步文件到 google drive 的软件么 |
![]() | 3 sephinh 2018-12-24 23:18:37 +08:00 via iPhone 不错不错,群晖能玩 docker 以后可玩性大大增加啊 |
![]() | 4 serenader 2018-12-24 23:58:22 +08:00 我的做法是在 Virtual Machine Manager 建个 Windows 虚拟机,然后在里面运行 「 Google 备份与同步」,设置自动同步网络文件夹里面的照片和视频。目前为止运行挺稳定的。 |
5 alwaystest 2018-12-25 00:01:43 +08:00 via Android 我现在的方案是 cloud sync 上传到 Google Drive 打通 photo 和 drive 就自动同步了。不过很少用到,一般拍照都是手机,pixel 自动上传。前段时间整理老照片的时候扔到群晖里让群晖上传到 Google,让 Google 做后期管理。 |
6 alwaystest 2018-12-25 00:02:56 +08:00 via Android 所以你们现在都是用群晖上传单反的照片吗? |
7 muyouming OP @serenader 我以前也是用 vmm 的方式,但是我有 10 万张照片,Google 官方的 backup &sync 一星期都扫不完,还时不时会卡死,并且 vmm 也有点拖慢群晖性能,所以才找到这个,内存占用也小,也不用虚拟 SMB 连接。 |
8 muyouming OP @alwaystest cloud sync 上传的话是占 Google 的 storage 的,我只有 15g,半天就给传满了。 |
9 muyouming OP @alwaystest 现在我的用法是配了个 USB copy 的任务,相机插到群晖上之后,会自动把相机照片复制到照片文件夹,然后就可以在 ds photo 和 moments 里看到。这个程序会自动监控文件变化并上传,然后在 Google photo 上就可以看到相机的照片。 这样用的原因主要还是因为群晖的 moments 分类不准确。 |
![]() | 10 serenader 2018-12-25 09:37:33 +08:00 via iPhone @muyouming 原来是这样。想问一下这个 docker 镜像是用了 Google Photo 的 API 吗?上传稳定吗? |
11 muyouming OP @serenader 这个程序不是我写的,我只是做了点修改和包装。从这个程序的介绍上来看,是仿照网页上传的模式来上传的,没有用 Google photo 的 API,Google 的 API 不支持高清模式上传,会占用空间。这个程序上传照片不占用空间 |
12 alwaystest 2018-12-25 10:03:54 +08:00 @muyouming 嗯,感觉 moments 不如 Google Photos 好用 |
13 alwaystest 2018-12-25 10:04:11 +08:00 @muyouming 是呀,所以买了 100G 空间。哈哈 |
![]() | 15 hronro 2018-12-25 10:43:47 +08:00 看了下,上传的程序好像是从 simonedegiacomi/gphotosuploader fork 过来改的?能否说下大概都改了哪些东西呢? |
![]() | 16 hronro 2018-12-25 10:51:21 +08:00 simonedegiacomi/gphotosuploader 这个好像都不再维护了,作者好像推荐用官方的 nmrshll/gphotos-uploader-cli 这个库? |
17 muyouming OP @alwaystest 我的 10W 张照片,100G 也不够啊,买 2T 有点贵了。 |
18 muyouming OP @hronro 你可以看下我的修改记录。 主要是改了 2 点: 1. 忽略 "@eaDir" 文件夹的内容 2. 修复了抓不到大写扩展名的照片或者视频的 bug。 simonedegiacomi/gphotosuploader 用的是非官方的 API,可以上传高清的照片,官方的 API 只能用原始分辨率,会占用存储空间。 |
19 muyouming OP @est 应该不至于吧,Google 有很多非官方 API,也没见 Google ban 哪个 |
20 alwaystest 2018-12-25 12:11:58 +08:00 via Android @muyouming 真拍照狂人 |
![]() | 21 est 2018-12-25 14:28:07 +08:00 @muyouming IMPORTANT NOTICE: as of 2018/09/01 this project is going to be deprecated, since Google now released an official google photos API. 要挂了? |
23 znf 2019-02-19 14:13:22 +08:00 |
24 faketemp 2019-03-09 13:22:22 +08:00 |
25 muyouming OP ![]() 已经修复,docker hub 的自动 build 看来我还是没用好,我替换成 local build 了,你们再试以下。 |
26 faketemp 2019-03-10 13:42:41 +08:00 |
27 faketemp 2019-03-10 13:45:49 +08:00 @muyouming 再反馈一个小问题: github 页面第 7 点描述中的命令有误 maxConcurrent 写成了 maxConcurrenct,直接复制使用也可以导致命令运行失败哦 |
29 faketemp 2019-03-10 16:51:57 +08:00 |
![]() | 30 toyst 2019-03-20 15:09:42 +08:00 多个目录怎么添加呢? |
![]() | 31 toyst 2019-03-21 10:05:22 +08:00 新建的子目录第一个文件无法监视上传 `2019/03/21 01:21:48 Finally consuming events for the /photo/Mobile/Redmi 4/DCIM/2019-03-21 file` |