GithubHelp home page GithubHelp logo

redis_backup's Introduction

redis_backup

Simple hourly redis persistence file backup service for Ubuntu servers. NOTE: the intent of this service is to VERY SIMPLY make a copy of your existing redis persistence file every hour. They overwrite meaning you always have only 1 day worth of files. IF you renamed your persistence file in redis.conf, then make sure you adjust the name in the rbackup.py file. You can also adjust the output file name if desired.

Make it a Service

  1. As ROOT, clone, copy or deploy this repo to /opt directory.
    • Assure the directory is names redis_backup
    • sudo mv /opt/redis_backup* /opt/redis_backup
    • Owned/Group: root root Permission: 755
    • Adjust if needed with:
    • sudo chown root redis_backup/
    • sudo chgrp root redis_backup/
    • sudo chmod 755 redis_backup/
  2. Create a symbolic link to the service file in /etc/systemd/system
    • sudo ln -s /opt/redis_backup/rbackup.service rbackup.service
  3. Make sure that your script is executable with:
    • sudo chmod u+x /opt/redis_backup/rbackup.py
  4. Edit the rbackup.py and change src & dest file names as desired
    • Necessary only IF you have renamed your persistence file
    • Else backups will be by default in /opt/redis_backup
  5. Reload systemctl
    • sudo systemctl daemon-reload
  6. Start it
    • sudo service rbackup start
  7. Check it
    • sudo service rbackup status
  8. Enable it to run at boot:
    • sudo systemctl enable rbackup

Done - you now have hourly backup files!

redis_backup's People

Contributors

randallshanephd avatar

Watchers

 avatar

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.