Git Product home page Git Product logo

picgo-plugin-autobackup's Introduction

picgo-plugin-autobackup

简介

将图片存储在免费的公共图床是非常吸引人的,尤其是那些带有 cdn 加速的图床。然而,这些图床的稳定性总让我们担忧,如何既能让我们享受公共图床带来的便利,又能解决后顾之忧?也许将图片备份下来是个不错的选择!当公共图床失效时,我们可以重新上传这些图片,而不必担心永远失去它们,本插件就是一款专注于图片备份的插件

备份空间

环境搭建

安装插件

GUI 用户直接在插件设置中搜索 autobackup 下载安装

687474703a2f2f6a696e672d696d6167652e746573742e757063646e2e6e65742f323032322f30352f696d6167652d32303232303531323137313531383933322e706e67

本地备份

  1. 点击 autobackup 右下角的齿轮按钮,选择配置 Plugin

    687474703a2f2f6a696e672d696d6167652e746573742e757063646e2e6e65742f323032322f30352f696d6167652d32303232303531323137313534373037352e706e67

  2. 选择备份空间为 Local,填写 mark 文件路径,点击确定

    687474703a2f2f6a696e672d696d6167652e746573742e757063646e2e6e65742f696d6167652d32303232303430323135343732363038372e706e67

  3. 再次点击 autobackup 右下角的齿轮按钮,选择配置本地备份

  4. 输入图片备份路径,点击确定

    687474703a2f2f6a696e672d696d6167652e746573742e757063646e2e6e65742f696d6167652d32303232303430323135343933353937362e706e67

  5. 设置完成

坚果云备份

  1. 点击 autobackup 右下角的齿轮按钮,选择配置 Plugin

    687474703a2f2f6a696e672d696d6167652e746573742e757063646e2e6e65742f323032322f30352f696d6167652d32303232303531323137313534373037352e706e67 (1)

  2. 选择备份空间为 NutStore,填写 mark 文件路径(若填写过则不必重复填写),点击确定

    687474703a2f2f6a696e672d696d6167652e746573742e757063646e2e6e65742f696d6167652d32303232303430323135353531363237372e706e67

  3. 再次点击 autobackup 右下角的齿轮按钮,选择配置坚果云备份

  4. 输入坚果云邮箱,点击确定

    image-20230926085306889

  5. 前往 坚果云安全选项,点击添加应用

    687474703a2f2f6a696e672d696d6167652e746573742e757063646e2e6e65742f696d6167652d32303232303430323136303834393637382e706e67

  6. 填写应用名称,点击生成密码

    687474703a2f2f6a696e672d696d6167652e746573742e757063646e2e6e65742f696d6167652d32303232303430323136313031393835392e706e67

  7. 点击完成,复制生成的应用密码

    687474703a2f2f6a696e672d696d6167652e746573742e757063646e2e6e65742f696d6167652d32303232303430323136313133393238322e706e67

  8. 粘贴复制的坚果云应用密码,点击确定

    687474703a2f2f6a696e672d696d6167652e746573742e757063646e2e6e65742f696d6167652d32303232303430323135353730323435342e706e67

  9. 输入坚果云备份文件夹 (若不存在则自动创建),点击确定

    687474703a2f2f6a696e672d696d6167652e746573742e757063646e2e6e65742f696d6167652d32303232303430323136303233313335322e706e67

  10. 设置完成

Q & A

类别 描述 解决方法
本地备份 图片备份路径下只有一个名为 "undefined" 的文件 请将插件更新至 v1.3.7+,详情参见 Issue
坚果云 备份至坚果云显示 "StatusCodeError 401" 配置项中需要的是 应用密码而不是账户密码
* 什么是 mark 文件 mark 文件记录了图片链接和备份图片的相关信息,当图片链接失效时可根据该文件追溯备份文件,进而进行重传等操作

Star History Chart

picgo-plugin-autobackup's People

Contributors

redns avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

picgo-plugin-autobackup's Issues

无法自动本地备份

以下是picgo的日志,系统是Windows11X64.上传格式为JPG,本地备份文件夹并未出现备份图片。直接用picgo上传测试的。
json文件出现:
{"total":2,"images":[]}
以下是picgo运行日志:
2022-04-13 20:02:18 [PicGo SUCCESS] 插件卸载成功
2022-04-13 20:02:28 [PicGo SUCCESS] autobackup加载成功!
2022-04-13 20:02:28 [PicGo SUCCESS] 插件安装成功
2022-04-13 20:02:50 [PicGo INFO] [PicGo Server] shutdown
2022-04-13 20:02:54 [PicGo SUCCESS] autobackup加载成功!
2022-04-13 20:02:54 [PicGo INFO] [PicGo Server] is listening at 36677
2022-04-13 20:03:22 [PicGo INFO] Before transform
2022-04-13 20:03:22 [PicGo INFO] Transforming... Current transformer is [path]
2022-04-13 20:03:22 [PicGo INFO] Before upload
2022-04-13 20:03:22 [PicGo INFO] beforeUploadPlugins: autobackup running
2022-04-13 20:03:22 [PicGo INFO] beforeUploadPlugins: renameFn running
2022-04-13 20:03:22 [PicGo INFO] Uploading... Current uploader is [lskypro]
2022-04-13 20:03:23 [PicGo INFO] afterUploadPlugins: autobackup running
2022-04-13 20:03:23 [PicGo SUCCESS]
https://oss.itefuir.com/2022/20220413200321.png

Win 11 23h2 & picgo version 2.3.1 无法安装

2024-04-10 16:41:35 [PicGo INFO] [AutoBackup] 加载中...
2024-04-10 16:41:35 [PicGo ERROR]
------Error Stack Begin------
Error: [AutoBackup] 配置文件损坏,未找到备份空间配置信息
at Object.register (C:\Users\Jay\AppData\Roaming\picgo\node_modules\picgo-plugin-autobackup\src\index.js:755:23)
at gt.registerPlugin (D:\common soft\Geek software\PicGo\resources\app.asar\node_modules\picgo\dist\index.cjs.js:1:39693)
at D:\common soft\Geek software\PicGo\resources\app.asar\node_modules\picgo\dist\index.cjs.js:1:52128
at Array.forEach ()
at Dt.install (D:\common soft\Geek software\PicGo\resources\app.asar\node_modules\picgo\dist\index.cjs.js:1:52093)
at processTicksAndRejections (node:internal/process/task_queues:96:5)
at async IpcMainImpl. (D:\common soft\Geek software\PicGo\resources\app.asar\background.js:2:666863)
-------Error Stack End-------

无法启动插件

picgo日志:
2022-05-11 10:34:51 [PicGo ERROR] startup error ------Error Stack Begin------ Error: ENOENT: no such file or directory, open 'Autobackup/mark.json' at Object.openSync (fs.js:447:3) at Object.func (electron/js2c/asar.js:138:31) at Object.func [as openSync] (electron/js2c/asar.js:138:31) at Object.writeFileSync (fs.js:1206:35) at ReadFileContext.callback (C:\Users\HelloKitty\AppData\Roaming\picgo\node_modules\picgo-plugin-autobackup\src\index.js:100:24) at FSReqCallback.readFileAfterOpen [as oncomplete] (fs.js:246:13) -------Error Stack End-------

picgo配置文件:
"picgoPlugins": { "picgo-plugin-super-prefix": true, "picgo-plugin-auto-delete": true, "picgo-plugin-autobackup": true }, "debug": true, "PICGO_ENV": "GUI", "needReload": false, "picgo-plugin-super-prefix": { "fileFormat": "", "prefixFormat": "YYYY/MM/DD/" }
picgo版本:2.3.0
插件版本:1.4.10
在picgo安装目录下,确实没有Autobackup/mark.json这个文件
picgo的插件目录,也没有发现这个文件,我该如何获取这个文件呢?

Image uploaded to Nut Cloud is broken

I can backup this image locally but it is broken when uploaded to Nut Cloud
image
image

Here is my config and log
"picgo-plugin-autobackup": {
"space": "NutStore",
"markFilepath": "E:/BackUpWin10/PicGo/Autobackup/mark.json"
},
"picgo-plugin-autobackup-settings": {
"local": {
"imagePath": "E:/BackUpWin10/PicGo/Autobackup/image"
},
"nutstore": {
"username": "",
"password": "",
"imagePath": "image"
}
},

2023-02-02 16:12:22 [PicGo INFO] Before transform
2023-02-02 16:12:22 [PicGo INFO] Transforming... Current transformer is [path]
2023-02-02 16:12:22 [PicGo INFO] Before upload
2023-02-02 16:12:22 [PicGo INFO] beforeUploadPlugins: autobackup running
2023-02-02 16:12:22 [PicGo INFO] beforeUploadPlugins: renameFn running
2023-02-02 16:12:22 [PicGo INFO] beforeUploadPlugins: squoosh running
2023-02-02 16:12:22 [PicGo INFO] **** squoosh begin here ****
2023-02-02 16:12:22 [PicGo INFO] Compressing 20230202161221.png 0 kb
2023-02-02 16:12:22 [PicGo SUCCESS] Finish 20230202161221.png 0 kb NaN% 248 ms
2023-02-02 16:12:22 [PicGo INFO] 20230202161221.png -> 0233e6029c78449b203b6e1686144f7c.png
2023-02-02 16:12:22 [PicGo INFO] **** squoosh end here 252 ms ****
2023-02-02 16:12:22 [PicGo INFO] Uploading... Current uploader is [imgur]
2023-02-02 16:12:24 [PicGo INFO] afterUploadPlugins: autobackup running
2023-02-02 16:12:24 [PicGo SUCCESS]
https://i.imgur.com/zxok9zF.png
2023-02-02 16:13:11 [PicGo INFO] Before transform
2023-02-02 16:13:11 [PicGo INFO] Transforming... Current transformer is [path]
2023-02-02 16:13:11 [PicGo INFO] Before upload
2023-02-02 16:13:11 [PicGo INFO] beforeUploadPlugins: autobackup running
2023-02-02 16:13:11 [PicGo INFO] beforeUploadPlugins: renameFn running
2023-02-02 16:13:11 [PicGo INFO] beforeUploadPlugins: squoosh running
2023-02-02 16:13:11 [PicGo INFO] **** squoosh begin here ****
2023-02-02 16:13:11 [PicGo INFO] Compressing 20230202161310.png 0 kb
2023-02-02 16:13:11 [PicGo SUCCESS] Finish 20230202161310.png 0 kb NaN% 144 ms
2023-02-02 16:13:11 [PicGo INFO] 20230202161310.png -> 0233e6029c78449b203b6e1686144f7c.png
2023-02-02 16:13:11 [PicGo INFO] **** squoosh end here 149 ms ****
2023-02-02 16:13:11 [PicGo INFO] Uploading... Current uploader is [imgur]
2023-02-02 16:14:32 [PicGo SUCCESS] autobackup加载成功!

无法本地备份问题

我看之前有人提过不能本地备份的问题,说切换到坚果云再切回来就可以了,我试了一下,确实可以了。
之所以能够解决是因为如果没有手动设置存储的位置,在picgo的data.json中自动生成的配置是"space": "local",local的首字母是小写了,手动改成Local或者在GUI的配置中选择Local就可以了。

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.