gdrive 是一个命令行工具,用于 Google Drive 的上传下载等操作。 GitHUB地址:https://github.com/prasmussen/gdrive 获取(仅64位系统使用): wget 4ker.cc/ss/gdrive;chmod +x gdrive 获取授权 /gdrive about 运行后会出现一个网址,打开,获取授权Key,粘贴到服务器界面,回车,会读取到谷歌盘的使用情况,连接成功! /gdrive upload filename 其他方法随便说说,备份网站的话,先使用打包命令定时(crontab)打包,然后使用nohup或者screen来定时运行上传命令即可,然后再定时删除谷歌盘中的历史备份文件 » 本文链接:Gdrive-服务器备份到谷歌云盘工具 » 转载请注明来源:刺客博客
不过要想使用完整的功能,比如GDrive、Dropbox网盘,就需要配置下域名,网盘api客户端密匙等信息(获取方式看后面)。 =<app_url> -e GDRIVE_CLIENT_ID=<gdrive_client> -e GDRIVE_CLIENT_SECRET=<gdrive_secret> -e DROPBOX_CLIENT_ID --name filetash -d \ -e APPLICATION_URL=file.moerats.com \ -e GDRIVE_CLIENT_ID=aaaa \ -e GDRIVE_CLIENT_SECRET =bbbb \ -p 8334:8334 \ machines/filestash 获取GDrive客户端信息 首先启用Google Drive API,启用地址:点击进入。 然后就可以获取GDRIVE_CLIENT_ID和GDRIVE_CLIENT_SECRET参数了。 最后登录的时候,出现该授权窗口就说明配置成功了。
/rclone-* 使用说明 ### 文件上传 rclone copy /home/backup gdrive:backup # 本地路径 配置名字:谷歌文件夹名字 ### 文件下载 rclone copy gdrive:backup /home/backup ### 列表 rclone ls gdrive:backup rclone lsl gdrive:backup # 比上面多一个显示上传时间 rclone lsd gdrive:backup # 只显示文件夹 ### 新建文件夹 rclone mkdir gdrive:backup ### 挂载 rclone mount gdrive:mm /root/
/My Drive/GO_RECORD/KGS-2006-19-10388-.tar.gz worker is running >>>Downloading content/gdrive/My Drive /GO_RECORD/KGS-2005-19-13941-.tar.gz worker is running >>>Downloading content/gdrive/My Drive/GO_RECORD /KGS-2004-19-12106-.tar.gz worker is running >>>Downloading content/gdrive/My Drive/GO_RECORD/KGS-2003 -19-7582-.tar.gz worker is running >>>Downloading content/gdrive/My Drive/GO_RECORD/KGS-2002-19-3646- .tar.gz worker is running >>>Downloading content/gdrive/My Drive/GO_RECORD/KGS-2001-19-2298-.tar.gz 下载完数据后
说明:之前看到有些人评论使用Rclone挂载Gdrive时,会出现部分文件上传失败和挂载崩掉等问题,后者在挂载OneDrive时也会出现,所以这里就专门花了点时间测试了下这些问题,然后就水个解决方法。 一般挂载Gdrive的时候,默认是使用的官方提供的api,所以高峰期上传文件的时候,由于很多人在用,导致api的流量上限,会出现各种403,ratelimit等错误,最常见的报错提示为:Failed to 至于Onedrive,博主也测试了下,貌似还没遇到上传问题,可能是使用rclone挂载的人数没gdrive多吧,至于其他问题也可以参考下本文设置。
'yolov5n.zip' 4. get_token & gdrive_download(没使用) 这两个函数是实现从 google drive 上下载压缩文件并将其解压, 再删除掉压缩文件。 会在 gdrive_download 中被调用。 get_token函数代码: def get_token(cookie=". /cookie"): """在gdrive_download中使用 实现从cookie中获取令牌token """ with open(cookie) as f: gdrive_download函数代码: def gdrive_download(id='16TiPfZj7htmTyhntwcZyEEAejOUxuT6m', file='tmp.zip'): = time.time() # 获取当前时间 file = Path(file) # Path将str转换为Path对象 cookie = Path('cookie') # gdrive
导入包 import globimport pandas as pdfrom google.colab import drive 挂载 Google Drive drive.mount('/gdrive 授权码输入框 单击链接并生成授权码 从 Google Drive 读取 CSV 文件 file_path = glob.glob("/gdrive/My Drive/***.csv")for file 代码可以复制和存储到 Google Drive 中,具体步骤如下: 挂载 Google Drive from google.colab import drive drive.mount('/content/gdrive %cd gdrive/My Drive/mkdir project%cd project/ ? 复制 GitHub repo,例如: !
cd yolov5 pip install -U -r requirements.txt # -q python3 -c "from yolov5.utils.google_utils import gdrive_download ; gdrive_download('1n_oKgR81BJtqk75b00eAjdv03qVCQn2f','coco128.zip')" 2.
导入包 import globimport pandas as pdfrom google.colab import drive 挂载 Google Drive drive.mount('/gdrive 授权码输入框 单击链接并生成授权码 从 Google Drive 读取 CSV 文件 file_path = glob.glob("/gdrive/My Drive/***.csv")for file 代码可以复制和存储到 Google Drive 中,具体步骤如下: 挂载 Google Drive from google.colab import drive drive.mount('/content/gdrive %cd gdrive/My Drive/mkdir project%cd project/ ? 复制 GitHub repo,例如: !
filestash image: machines/filestash restart: always environment: - APPLICATION_URL= - GDRIVE_CLIENT_ID =<gdrive_client> - GDRIVE_CLIENT_SECRET=<gdrive_secret> - DROPBOX_CLIENT_ID=<dropbox_key>
/rclone config 第一步选择 n,然后回车输入一个 name,建议这个 name 设置的简单好记一点 全部完成后,现在新建一个你要挂载的目录: mkdir -p /home/gdrive /rclone mount mygd: /home/gdrive --allow-other --allow-non-empty --vfs-cache-mode writes 上面的 mygd 指的是你自己设定的名称 Description=rclone [Service] User=root ExecStart=/usr/bin/rclone mount guge: /home/gdrive
Mutagen,博主发现用来实现Windows和Linux VPS之间双向同步的时候,速度还行,资源占用都不算很大,这里就大致水下使用方法,顺便也可以结合下Rclone,间接实现不挂梯子达到Windows和Gdrive 同步到GDrive网盘 提示:这里挂载网盘的同步参数会比上面多个--probe-mode=assume,不然远程会不停的产生很多缓存文件。 $env:MUTAGEN_SSH_PATH= "$env:GIT_INSTALL_ROOT\usr\bin" 比如我要同步本地D盘根目录的BACK文件夹和远程Linux服务器挂载Gdrive网盘的/moerats
允许将图表保存到GDrive,Dropbox和OneDrive等云存储服务或您自己的计算机 效果 发布者:全栈程序员栈长,转载请注明出处:https://javaforall.cn/152034.html
git clone https://github.com/portu-sim/sd-webui-bmab /content/gdrive/$mainpth/sd/stable-diffusion-webui
挂载谷歌云端硬盘: from google.colab import drive drive.mount('/content/gdrive') 切换当前目录为Google云端硬盘的项目文件夹: import os project_path = '/content/gdrive/My Drive/nvidia' #change dir to your project folder os.chdir(project_path
要求Centos系统 在线预览所有源代码 https://file.acfox.cc/gdrive/%E8%84%9A%E6%9C%AC/cc%E8%84%9A%E6%9C%ACnodejs/ 此脚本采用
conda安装: conda install -c conda-forge dvc 安装特定远程存储支持: pip install dvc-s3 # AWS S3支持 pip install dvc-gdrive dvc remote add -d s3-remote s3://your-bucket/path/to/storage # 配置Google Drive远程存储 dvc remote add -d gdrive-remote gdrive://your-google-drive-id/path/to/storage # 配置SSH远程存储 dvc remote add -d ssh-remote ssh://user@server my-aws-profile dvc remote modify cloud-remote s3-verify-ssl true # Google Drive配置优化 dvc remote modify gdrive-remote gdrive-use-service-account true dvc remote modify gdrive-remote gdrive-client-id-file /path/to/credentials.json
Transfer.sh 旨在与Linux shell一起使用目前支持 s3(Amazon S3)、gdrive(Google Drive)、storj(Storj)提供者和本地文件系统(local)。
随着大容量 Onedrive 和 Gdrive 的普及,rclone (及衍生软件 gclone, autorclone)也被越来越多的人所熟知。
它兼容本地文件系统(local),同时也支持 s3(Amazon S3)和 gdrive(Google Drive)等云存储服务。 它被设计为与Linux Shell一起使用。