Giter Site home page Giter Site logo

backup's Introduction

backup's People

Contributors

nehak275 avatar vanzhiganov avatar

Stargazers

 avatar

Watchers

 avatar

backup's Issues

Database backup

  • Mysql
  • PostgreSQL

make structure and data separated if possible

Dockerize

  • create dockerfile
  • add crudini for config management with environment variables
  • crontab in docker image

union sources in one file

Like this

[Union:site-and-db-anzhiganov.com]
File = site-anzhiganov.com
Database = mysql-anzhiganov.com
Remote = webdav_yandex

[File:site-anzhiganov.com]
Enabled = yes
Directory = /var/www/anzhiganov.com/
Compression = yes
CompressionLevel = 9

[Database:mysql-anzhiganov.com]
Enabled = yes
Engine = mysql
Host = localhost
User = dbuser
Password = dbpassword
Database = anzhiganovcom
Compression = yes
CompressionLevel = 9

backup management tool

make restore tool

with features:

  • list stored backups
  • remove backup from storage
  • restore backup

Restore from webdav

import easywebdav

webdav = easywebdav.connect(remote['host'], port=remote['port'], protocol=remote['protocol'], username=remote['login'], password=remote['password'])

webdav.download("remote source file", "destination file")

Error #1

python backupfiles.py

Traceback (most recent call last):
File "backupfiles.py", line 75, in
backup(FilesToBackup)
File "backupfiles.py", line 65, in backup
logging.error(u'Ошибка добавления файла: %s в архив %s' % (l, Backup.filename))
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 16: ordinal not in range(128)

naming format in DEFAULT section

like

ArchiveName = %(date)s-%(instance)s-%(task)s

DateFormat = %Y%m%d
or
DateFormat = %A %d.%m.%Y

parameters

%(date)s
%(instance)s
%(task)s

Чтение .my.cnf

Ini файл с имеющимся паролем для подключения к серверу mysql

Пример:

[client]
password=PasswordStrin1356

Email notifications

Email notifications after finish with errors and short stats.

  • Errors
  • Archive size
  • Total files archived

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.