Skip to main content

empty

Project description

Requirements

  • python3
  • sshpass
  • mysqldump
  • click

Set up

pip install sbackup2

Sample task config

Default placed in /etc/sbackup2.d/. sbackup2 loads all tasks with *.conf.

{
  "options": {
    "sftp_host": "sftp.selcdn.ru",
    "sftp_user": "USER",
    "sftp_password": "PASSWORD",
    "sftp_options": "-oBatchMode=no",
    "sftp_remote_dir": "DIR",
    "file_name_tpl": "{host_name}_{year}_{month}_{day}__{hour}_{minutes}_{seconds}.tar.bz2"
  },
  "tasks": [
    {
      "fd_exclude": ["sessions"],
      "fd": [
        "/var/www/",
        "/etc/nginx/nginx.conf"
      ],
      "db": [
        ["mysql", "db1"],
        ["mysql", "db2"],
        ["psql", "db1"]     // postgresql not support yet
      ]
    }
  ]
}

DB’s

MySQL

For access to databases you should create the file /<user>/.my.cfg with context:

[client]
user=root
password=PASSWORD

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for sbackup2, version 1.1.3
Filename, size File type Python version Upload date Hashes
Filename, size sbackup2-1.1.3.tar.gz (4.1 kB) File type Source Python version None Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page