Code Monkey home page Code Monkey logo

filebackup's Introduction

局域网文件备份工具

这是一个好用的局域网文件备份工具,解决日常工作和生活中需要局域网定时文件、数据库备份的需求。

我的博客:www.gaojunxin.cn

功能

  1. 定时文件备份并上传到服务端(已经实现)
  2. 定时mysql备份并上传到服务端(已经实现)
  3. 局域网文件上传和下载(尚未实现)

客户端

客户端实现了根据配置文件config.yml来定时备份数据库和文件夹,然后自动上传备份文件到服务端。

安装执行环境

  1. 安装python环境
  2. 安装pipenv
pip install pipenv
  1. 安装脚本依赖
pipenv install

启动

  1. 修改config.yml中的配置,并将整个agent文件夹放置在需要执行备份任务的计算机上。
  2. 启动客户端
# 进入agent目录
cd agent
# 安装依赖
pipenv install
# 执行启动程序
pipenv run python agent.py

具体配置可以参考agent/config.yml文件中的注释

image.png

服务端

服务端采用flask实现了一个简单的文件上传,待完善更多功能。

安装执行环境

同客户端

启动

  1. 启动服务端
# 进入agent目录
cd server
# 安装依赖
pipenv install
# 执行启动程序
pipenv run python app.py

#后台执行
pipenv run python -u agent.py >> agent.log &

提示如下日志,则启动成功

❯ pipenv run python app.py
 * Serving Flask app 'app'
 * Debug mode: on
WARNING: This is a development server. Do not use it in a production deployment. Use a production WSGI server instead.
 * Running on http://127.0.0.1:5000
Press CTRL+C to quit
 * Restarting with stat
 * Debugger is active!
 * Debugger PIN: 142-650-752

目前只实现了客户端自动上传到服务端,没有界面上的过多操作,等待后续补充操作界面。

filebackup's People

Contributors

gaojunxin avatar

Stargazers

 avatar  avatar  avatar tty avatar  avatar  avatar  avatar yangyubing4397 avatar  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.