Code Monkey home page Code Monkey logo

backer's People

Stargazers

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

Watchers

 avatar  avatar

backer's Issues

A few questions

Plugin looks like what I have been looking for. I just had the following questions

  1. Why does it use filesystem in a single file? What is the benefits over just using a normal folder that gets bind mounted into the container?
  2. If you specify say a 5gb volume will the file take up all 5gb even if the data uses say 5mb?
  3. Is there a way to make one that can expand as much as it needs to instead of being fixed size?
  4. What happens if your volume uses all its allocated space? I assume you get an out of space error but I thought to check.
  5. Can you set it to auto backup when a volume is no longer in use or will be destroyed.
  6. If 5 above is possible can it be made to restore it automatically if the volume does not exist on volume create if there is a backup for it.

This seems perfect for my use case of backups as well as move volumes between hosts.

bug with restore

if you try to restore when the repository does not exist yet then the volume mounts but "Options" on the mount is null.

 docker volume inspect radarr_config 
[
    {
        "CreatedAt": "0001-01-01T00:00:00Z",
        "Driver": "srgl/backer:latest",
        "Labels": null,
        "Mountpoint": "/mnt/volumes/radarr_config/_data",
        "Name": "radarr_config",
        "Options": null,
        "Scope": "local",
        "Status": {
            "mounted": true
        }
    }
]

volume driver errors creating volume

setup just following readme but volumes done work. error from syslog for create and mount of volume from docker compose

seer@portable:/sm/temp/backup$ tail -n 1050 /var/log/syslog | grep docker
Nov 18 05:59:51 portable dockerd[1836]: time="2019-11-18T05:59:51+11:00" level=info msg="Action VolumeDriver.Get, {\"Name\":\"backup_testing\"}" plugin=acbc33eba7ead383228238fcdfdf88456a07b3de07f2fce92bc8592128d70823
Nov 18 05:59:51 portable dockerd[1836]: time="2019-11-18T05:59:51+11:00" level=error msg="Error processing action VolumeDriver.Get: Error: Volume backup_testing doesn't exist" plugin=acbc33eba7ead383228238fcdfdf88456a07b3de07f2fce92bc8592128d70823
Nov 18 05:59:51 portable dockerd[1836]: time="2019-11-18T05:59:51+11:00" level=error msg="    at /app/src/plugin.js:166:26" plugin=acbc33eba7ead383228238fcdfdf88456a07b3de07f2fce92bc8592128d70823
Nov 18 05:59:51 portable dockerd[1836]: time="2019-11-18T05:59:51+11:00" level=error msg="    at /app/node_modules/async-lock/lib/index.js:125:12" plugin=acbc33eba7ead383228238fcdfdf88456a07b3de07f2fce92bc8592128d70823
Nov 18 05:59:51 portable dockerd[1836]: time="2019-11-18T05:59:51+11:00" level=error msg="    at AsyncLock._promiseTry (/app/node_modules/async-lock/lib/index.js:249:31)" plugin=acbc33eba7ead383228238fcdfdf88456a07b3de07f2fce92bc8592128d70823
Nov 18 05:59:51 portable dockerd[1836]: time="2019-11-18T05:59:51+11:00" level=error msg="    at exec (/app/node_modules/async-lock/lib/index.js:124:9)" plugin=acbc33eba7ead383228238fcdfdf88456a07b3de07f2fce92bc8592128d70823
Nov 18 05:59:51 portable dockerd[1836]: time="2019-11-18T05:59:51+11:00" level=error msg="    at AsyncLock.acquire (/app/node_modules/async-lock/lib/index.js:140:3)" plugin=acbc33eba7ead383228238fcdfdf88456a07b3de07f2fce92bc8592128d70823
Nov 18 05:59:51 portable dockerd[1836]: time="2019-11-18T05:59:51+11:00" level=error msg="    at Plugin.get (/app/src/plugin.js:164:22)" plugin=acbc33eba7ead383228238fcdfdf88456a07b3de07f2fce92bc8592128d70823
Nov 18 05:59:51 portable dockerd[1836]: time="2019-11-18T05:59:51+11:00" level=error msg="    at Plugin.handler (/app/src/plugin.js:44:38)" plugin=acbc33eba7ead383228238fcdfdf88456a07b3de07f2fce92bc8592128d70823
Nov 18 05:59:51 portable dockerd[1836]: time="2019-11-18T05:59:51+11:00" level=error msg="    at processTicksAndRejections (internal/process/task_queues.js:89:5)" plugin=acbc33eba7ead383228238fcdfdf88456a07b3de07f2fce92bc8592128d70823
Nov 18 05:59:51 portable dockerd[1836]: time="2019-11-18T05:59:51+11:00" level=info msg="Action VolumeDriver.Capabilities, {}" plugin=acbc33eba7ead383228238fcdfdf88456a07b3de07f2fce92bc8592128d70823
Nov 18 05:59:51 portable dockerd[1836]: time="2019-11-18T05:59:51+11:00" level=info msg="Action VolumeDriver.Get, {\"Name\":\"backup_testing\"}" plugin=acbc33eba7ead383228238fcdfdf88456a07b3de07f2fce92bc8592128d70823
Nov 18 05:59:51 portable dockerd[1836]: time="2019-11-18T05:59:51+11:00" level=error msg="Error processing action VolumeDriver.Get: Error: Volume backup_testing doesn't exist" plugin=acbc33eba7ead383228238fcdfdf88456a07b3de07f2fce92bc8592128d70823
Nov 18 05:59:51 portable dockerd[1836]: time="2019-11-18T05:59:51+11:00" level=error msg="    at /app/src/plugin.js:166:26" plugin=acbc33eba7ead383228238fcdfdf88456a07b3de07f2fce92bc8592128d70823
Nov 18 05:59:51 portable dockerd[1836]: time="2019-11-18T05:59:51+11:00" level=error msg="    at /app/node_modules/async-lock/lib/index.js:125:12" plugin=acbc33eba7ead383228238fcdfdf88456a07b3de07f2fce92bc8592128d70823
Nov 18 05:59:51 portable dockerd[1836]: time="2019-11-18T05:59:51+11:00" level=error msg="    at AsyncLock._promiseTry (/app/node_modules/async-lock/lib/index.js:249:31)" plugin=acbc33eba7ead383228238fcdfdf88456a07b3de07f2fce92bc8592128d70823
Nov 18 05:59:51 portable dockerd[1836]: time="2019-11-18T05:59:51+11:00" level=error msg="    at exec (/app/node_modules/async-lock/lib/index.js:124:9)" plugin=acbc33eba7ead383228238fcdfdf88456a07b3de07f2fce92bc8592128d70823
Nov 18 05:59:51 portable dockerd[1836]: time="2019-11-18T05:59:51+11:00" level=error msg="    at AsyncLock.acquire (/app/node_modules/async-lock/lib/index.js:140:3)" plugin=acbc33eba7ead383228238fcdfdf88456a07b3de07f2fce92bc8592128d70823
Nov 18 05:59:51 portable dockerd[1836]: time="2019-11-18T05:59:51+11:00" level=error msg="    at Plugin.get (/app/src/plugin.js:164:22)" plugin=acbc33eba7ead383228238fcdfdf88456a07b3de07f2fce92bc8592128d70823
Nov 18 05:59:51 portable dockerd[1836]: time="2019-11-18T05:59:51+11:00" level=error msg="    at Plugin.handler (/app/src/plugin.js:44:38)" plugin=acbc33eba7ead383228238fcdfdf88456a07b3de07f2fce92bc8592128d70823
Nov 18 05:59:51 portable dockerd[1836]: time="2019-11-18T05:59:51+11:00" level=error msg="    at processTicksAndRejections (internal/process/task_queues.js:89:5)" plugin=acbc33eba7ead383228238fcdfdf88456a07b3de07f2fce92bc8592128d70823
Nov 18 05:59:51 portable dockerd[1836]: time="2019-11-18T05:59:51+11:00" level=info msg="Action VolumeDriver.Create, {\"Name\":\"backup_testing\",\"Opts\":{\"backup_schedule\":\"0 1 * * *\",\"env_B2_ACCOUNT_ID\":\"xxx\",\"env_B2_ACCOUNT_KEY\":\"xxx\",\"env_restic_password\":\"testing\",\"env_restic_repository\":\"b2:xxx:/download\",\"forget_policy\":\"l7 w30\",\"forget_schedule\":\"0 1 * * 0\",\"restore\":\"n\",\"size\":\"25M\"}}" plugin=acbc33eba7ead383228238fcdfdf88456a07b3de07f2fce92bc8592128d70823
Nov 18 05:59:51 portable dockerd[1836]: time="2019-11-18T05:59:51+11:00" level=info msg="Action VolumeDriver.Capabilities, {}" plugin=acbc33eba7ead383228238fcdfdf88456a07b3de07f2fce92bc8592128d70823
Nov 18 05:59:51 portable dockerd[1836]: time="2019-11-18T05:59:51+11:00" level=info msg="Action VolumeDriver.Get, {\"Name\":\"backup_testing\"}" plugin=acbc33eba7ead383228238fcdfdf88456a07b3de07f2fce92bc8592128d70823
Nov 18 05:59:51 portable dockerd[1836]: time="2019-11-18T05:59:51+11:00" level=info msg="Action VolumeDriver.Capabilities, {}" plugin=acbc33eba7ead383228238fcdfdf88456a07b3de07f2fce92bc8592128d70823
Nov 18 05:59:51 portable dockerd[1836]: time="2019-11-18T05:59:51+11:00" level=info msg="Action VolumeDriver.Get, {\"Name\":\"backup_testing\"}" plugin=acbc33eba7ead383228238fcdfdf88456a07b3de07f2fce92bc8592128d70823
Nov 18 05:59:51 portable dockerd[1836]: time="2019-11-18T05:59:51+11:00" level=info msg="Action VolumeDriver.Capabilities, {}" plugin=acbc33eba7ead383228238fcdfdf88456a07b3de07f2fce92bc8592128d70823
Nov 18 05:59:51 portable dockerd[1836]: time="2019-11-18T05:59:51+11:00" level=info msg="Action VolumeDriver.Mount, {\"Name\":\"backup_testing\",\"ID\":\"a00373f0f0209c560670a8fd3c3ae23f4485b08813a6e2c2852baf3c3b9a68c2\"}" plugin=acbc33eba7ead383228238fcdfdf88456a07b3de07f2fce92bc8592128d70823

where can i get logs?

I created a volume using docker compose but the container played up like it had an issue with it ans when i tried to go to the mount point it does not exist. Is there a log or something i can use the find the issue?

docker volume inspect temp_muximux_config 
[
    {
        "CreatedAt": "0001-01-01T00:00:00Z",
        "Driver": "srgl/backer:latest",
        "Labels": {
            "com.docker.compose.project": "temp",
            "com.docker.compose.volume": "muximux_config"
        },
        "Mountpoint": "/mnt/volumes/temp_muximux_config/_data",
        "Name": "temp_muximux_config",
        "Options": {
            "backup_schedule": "0 1 * * *",
            "env_B2_ACCOUNT_ID": "xxxxxx",
            "env_B2_ACCOUNT_KEY": "xxxxxxx",
            "env_restic_password": "xxxxxxx",
            "env_restic_repository": "b2:xxxxxxx:/muximux_config",
            "forget_policy": "l7 w30",
            "forget_schedule": "0 1 * * 0",
            "restore": "y",
            "size": "25M"
        },
        "Scope": "local",
        "Status": {
            "mounted": true
        }
    }

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.