Giter Club home page Giter Club logo

Comments (10)

kMikaZu avatar kMikaZu commented on September 2, 2024 1

Hi @jorinvo

Thanks, I give it a try today and keep you posted.

Kind regards
Mika

from ghbackup.

jorinvo avatar jorinvo commented on September 2, 2024 1

In the upper snipped you have $slack_hook in the lower $SLACK_HOOK. I guess I would need to see more of the code that you use to help you here..

from ghbackup.

jorinvo avatar jorinvo commented on September 2, 2024

hi @kMikaZu! I was wondering the same thing myself! Just never got around looking into it :) I think I solved it. But I had to remove the total object part from the info.

Could you v.1.12.0?
Thank you!

from ghbackup.

kMikaZu avatar kMikaZu commented on September 2, 2024

We are sending the statistics via a Slack WebHook. At first we used the option from your tutorial and that works, but the text doesn't contain the statistics.

Code from your tutorial:

/opt/ghbackup -secret $github_token $backup_dir \
  && curl -X POST --data-urlencode \
  "payload={\"text\": \"Successful GitHub backup.\"}" \
  $slack_hook

On this GitHub page, you are explaining how to send more statistics to Slack, like this:

ghbackup -secret $GITHUB_TOKEN DIR \
  | tail -n1 \
  | xargs -I%% curl -s -X POST --data-urlencode 'payload={"text": "%%"}' $SLACK_HOOK

But that doesn't seem to work on Debian 9. Keeps returning the following error: curl: no URL specified!

What would you suggest when using the script on a Debian machine?

Thanks

from ghbackup.

jorinvo avatar jorinvo commented on September 2, 2024

the error message sounds like you didn't set the SLACK_HOOK variable? Maybe you set slack_hook instead? Make sure all variables exist and cases match :)

from ghbackup.

kMikaZu avatar kMikaZu commented on September 2, 2024

Hi

The Slack Hook is defined, since the code from your tutorial works but the code from your GitHub Docs returns that error.

Thanks

from ghbackup.

kMikaZu avatar kMikaZu commented on September 2, 2024

Ok, that one I misunderstood! You were right about it, it works. Case-Sensitive :-)
And the log mentions the updated Repos now. Seems to work ok, but will do some more testing. Is it possible to add even more statistics (a complete backup-report of all the repos?)?

Thanks!

from ghbackup.

jorinvo avatar jorinvo commented on September 2, 2024

If you want to post all output to Slack and not only the statistics, you can skip the line | tail -n1 \. Not sure if that is enough information. Let me know what other kind of statistics you are looking for!

from ghbackup.

jorinvo avatar jorinvo commented on September 2, 2024

@kMikaZu if you have any suggestions to other statistics/details we should output, let me know! Can open a new issue for it 🙂

from ghbackup.

kMikaZu avatar kMikaZu commented on September 2, 2024

The LFS issue is more important at this time, afterwards we can pick up the statistics. But thanks a lot!!

from ghbackup.

Related Issues (20)

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.