Code Monkey home page Code Monkey logo

elabftw-remote-backup's Introduction

eLabFTW remote backup

This is a controller and target for remote eLabFTW backups. It instructs the eLabFTW server to do a backup, pulls it onto itself and pushes it to an additional backup destionation.

Setup

  1. Configure elabctl backup for /var/backups/elabftw
  2. Create directories on the eLabFTW host:
    • mkdir -p /var/backups/elabftw/_archive/daily_this_week
    • mkdir -p /var/backups/elabftw/_archive/daily_last_week
    • chown -R :$SSHUSER /var/backups/elabftw
    • chmod -R g+w /var/backups/elabftw
  3. Create direcotries on the additional backup destionation:
    • $ftp_path/weekly_this_month
    • $ftp_path/weekly_last_month
    • $ftp_path/daily_last_week
    • $ftp_path/daily_2nd_week
  4. Run 1-create-localdir.sh
  5. chmod u+x elab-backup_do_*.sh
  6. Run requirements.sh
  7. Create ftp.secret from ftp.secret.sample
  8. Fill all necessary variables in the script files.
    • I am sorry, this must be made easier in the future.
  9. The user ($SSHUSER) on the eLabFTW host ($SSHHOST) must have rights to sudo for elabctl without password
  10. Add elab-backup_do_*.sh scripts to crontab: use crontab -e or put into /etc/crontab, e.g.:
    • 0 19 * * * <SCRIPT PATH>/elab-backup_do_daily.sh
    • 45 12 1-7 * * [ $(date +\%u) -eq 5 ] && <SCRIPT PATH>/elab-backup_do_monthly.sh (Does it on the first Friday in every month on my system. Please check for yours.)
    • 0 13 * * FRI <SCRIPT_PATH>/elab-backup_do_weekly.sh
  11. Currently VPN connection is hardcoded for connection to eLabFTW host.
    • You need to get those scripts or remove them.
    • This script expects VPN scripts in $HOME/scripts/vpn, e.g. see Cisco VPN scripts

elabftw-remote-backup's People

Contributors

s4b7r 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.