Skip to content

Commit

Permalink
fix: Remove backup command (frappe#1345)
Browse files Browse the repository at this point in the history
bench's backup command is redundant and acts as a wrapper over Frappe's
backup command. This caused a conflict with Frappe's CLI after the
resolution correction introduced via a6f1964

ref: https://github.com/frappe/frappe/runs/7592331617
  • Loading branch information
gavindsouza authored Jul 31, 2022
1 parent 1ec17e4 commit 0cd5fca
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 15 deletions.
2 changes: 0 additions & 2 deletions bench/commands/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,6 @@ def bench_command(bench_path="."):

from bench.commands.utils import (
backup_all_sites,
backup_site,
bench_src,
clear_command_cache,
disable_production,
Expand Down Expand Up @@ -105,7 +104,6 @@ def bench_command(bench_path="."):
bench_command.add_command(set_redis_queue_host)
bench_command.add_command(set_redis_socketio_host)
bench_command.add_command(download_translations)
bench_command.add_command(backup_site)
bench_command.add_command(backup_all_sites)
bench_command.add_command(renew_lets_encrypt)
bench_command.add_command(disable_production)
Expand Down
13 changes: 0 additions & 13 deletions bench/commands/utils.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
# imports - standard imports
import os
import sys

# imports - third party imports
import click
Expand Down Expand Up @@ -135,18 +134,6 @@ def renew_lets_encrypt():
renew_certs()


@click.command("backup", help="Backup single site")
@click.argument("site")
def backup_site(site):
from bench.bench import Bench
from bench.utils.system import backup_site

if site not in Bench(".").sites:
print(f"Site `{site}` not found")
sys.exit(1)
backup_site(site, bench_path=".")


@click.command("backup-all-sites", help="Backup all sites in current bench")
def backup_all_sites():
from bench.utils.system import backup_all_sites
Expand Down

0 comments on commit 0cd5fca

Please sign in to comment.