Skip to main content

Simple linux backup controled by a YAML file.

Project description

me-backup

Install

Baixar o pacote do PIP.

    $ sudo python -m pip install me-backup

Para testar a instalação, rode o comando de help:

    $ sudo python -m me_backup --help   
    Usage: python -m me_backup [OPTIONS] COMMAND [ARGS]...

    Options:
    --help  Show this message and exit.

    Commands:
    install  Create needed files (run with sudo).

Caso não exista nenhuma instalação anterior em /etc/me-backup, simplesmente chame o módulo dentro da instalação de python do sistema usando sudo. Isso irá abrir um formulário para instação dos recursos.

Neste caso, é exigido uso de privilégio, porque o pacote irá realizar alterações na pasta /etc/me-backup e no cron do usuário informado na instalação em /var/spool/cron/.

    $ sudo python -m me_backup install
    
    Me-backup never runned, this follow steps will create the tool folder and config file into /etc/me-backup! (need sudo)
    Default User: [lucas] 
    Users shell rc: [/home/lucas/.zshrc]
    Task file: [/etc/me-backup/tasks.yaml] 
    Log path: [/etc/me-backup/mebk.log] 
    Log level: [INFO] 
    Default host: [127.0.0.1]               
    Default crontab path: [/var/spool/lucas]

Pronto! Rodando o help novamente, outros comandos para uso serão listados.

    $ sudo python -m me_backup --help
    
    Usage: python -m me_backup [OPTIONS] COMMAND [ARGS]...

    Options:
    --help  Show this message and exit.

    Commands:
    generate_yaml  Create a tasks.yaml model file.
    print_rsync    Return the rsync command
    run_now        Run the backup tasks right now.
    schedule       Schedule the tasks to run using your time configurations.

Dentro da pasta /etc/me-backup o arquivo tasks.yaml será criado. Nele existe uma tarefa de modelo pré-configurada:

    tasks:
    - name: backup home
        slug: bkp_home
        src: /home/lucas/Arduino
        remote_src: False
        dst: /mnt/storage/backup/TESTE/dst1/Arduino
        remote_dst: False
        copy_config:
        type: sync
        wake_on_lan:
        enabled: False
        mac_address: 'd8:9c:67:07:87:e3'
        frequency:
        shortcut: daily
        exclude:
        extensions:
            - txt
        folder:
            - .ssh

Project details


Download files

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

Source Distribution

me_backup-0.1.24.tar.gz (12.9 kB view details)

Uploaded Source

Built Distribution

me_backup-0.1.24-py3-none-any.whl (13.3 kB view details)

Uploaded Python 3

File details

Details for the file me_backup-0.1.24.tar.gz.

File metadata

  • Download URL: me_backup-0.1.24.tar.gz
  • Upload date:
  • Size: 12.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.13 CPython/3.10.4 Linux/5.16.11-200.fc35.x86_64

File hashes

Hashes for me_backup-0.1.24.tar.gz
Algorithm Hash digest
SHA256 b6cbf01bfd0f34006075c34dbc9e60989e55f2da06494e3f0b6e826ec991e296
MD5 299ebaef900fc68fb3a118434272b5c3
BLAKE2b-256 55b0eac881483d2544a8557a8125d0edc6134dac46f89050f33fadd6aea6accf

See more details on using hashes here.

File details

Details for the file me_backup-0.1.24-py3-none-any.whl.

File metadata

  • Download URL: me_backup-0.1.24-py3-none-any.whl
  • Upload date:
  • Size: 13.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.13 CPython/3.10.4 Linux/5.16.11-200.fc35.x86_64

File hashes

Hashes for me_backup-0.1.24-py3-none-any.whl
Algorithm Hash digest
SHA256 f95ab5aa28b54a37f73f394cf3984df2eb47e44c559072a99219b21fcccf471c
MD5 2c5c2466ce82d6e3656568b3dbace126
BLAKE2b-256 1cad9f607843d3171b82c86a03e05333d1f925dc75344f82182f965ae3f63b20

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page