Giter Site home page Giter Site logo

gbackup's Issues

Move from cronjob

Its ok to use cronjob from Linux, however I rather use everything in Go instead.
Knowing this, I should implement something like this from gmah

        runCh := make(chan struct{})
        go func() {
                // Run forever, trigger a run at 18:00 every day.
                for {
                        now := time.Now()
                        runToday := now.Hour() < 18
                        today := now.Day()
                        log.Printf("now = %v, runToday = %v", now, runToday)
                        for {
                                if time.Now().Day() != today {
                                        // Day changed, re-evaluate whether to run today.
                                        break
                                }


                                nextHour := time.Now().Truncate(time.Hour).Add(1 * time.Hour)
                                log.Printf("today = %d, runToday = %v, next hour: %v", today, runToday, nextHour)
                                time.Sleep(time.Until(nextHour))


                                if time.Now().Hour() >= 18 && runToday {
                                        runToday = false
                                        runCh <- struct{}{}
                                }
                        }
                }
        }()


        for range runCh {
                run(args.Email, args.Password, args.Dump, &newMessages, args.Gokrazy)
        }

Size diff

Add size diff in order to view if target is bigger or smaller

Implement new way of rsync for gk LXC

I dont need to have a cronjob inside gk LXC. I can have a similar setup like Syncthing.
I need to create a ssh key file in proxmox, then add that to the authozired_keys inside gk lxc and then make sure I can rsync from gk lxc to proxmox.
This way I will have information in grafana.
I should do the same for the leaks.

  • Implement correct rsync mechanism to gk LXC c59c851
  • Implement correct rsync mechanism to leaks 51a36eb
  • Implement correct rsync mechanism to monitoring 23e1ffb
  • Implement correct rsync mechanism to postgresql fe95fd0

Incremental backups?

Right now I am performing incremental backups with rsync but I want to have similar information not incremental.
Need to change some flags on rsync

Fix TODO

I've noticed there are some typos and stuff I dont use anymore

Is cp good?

I should use rsync to copy from /mnt/pve/external to /storagepool/backups since that will be faster and rsync will only make diffs

Run on demand

Create a route that when a POST is made perform the backup on demand

Execute backups on demand

Create simple webserver that waits for a POST request to execute a backup on demand.
This webserver has a GET request to list the available backup targets meaning that the POST requests expects a JSON object of targets or in case of all a *
Later this can be used in the telegram bot

Email without info

After using cronjob from golang email template is empty without Content

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.