mirror of
https://github.com/frappe/bench.git
synced 2025-01-25 07:58:24 +00:00
fix: Remove backup command (#1345)
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 a6f196440ad8c9b65a5bbc31a88d8c80f2ba2ded ref: https://github.com/frappe/frappe/runs/7592331617
This commit is contained in:
parent
1ec17e40f3
commit
0cd5fca322
@ -73,7 +73,6 @@ bench_command.add_command(switch_to_develop)
|
|||||||
|
|
||||||
from bench.commands.utils import (
|
from bench.commands.utils import (
|
||||||
backup_all_sites,
|
backup_all_sites,
|
||||||
backup_site,
|
|
||||||
bench_src,
|
bench_src,
|
||||||
clear_command_cache,
|
clear_command_cache,
|
||||||
disable_production,
|
disable_production,
|
||||||
@ -105,7 +104,6 @@ bench_command.add_command(set_redis_cache_host)
|
|||||||
bench_command.add_command(set_redis_queue_host)
|
bench_command.add_command(set_redis_queue_host)
|
||||||
bench_command.add_command(set_redis_socketio_host)
|
bench_command.add_command(set_redis_socketio_host)
|
||||||
bench_command.add_command(download_translations)
|
bench_command.add_command(download_translations)
|
||||||
bench_command.add_command(backup_site)
|
|
||||||
bench_command.add_command(backup_all_sites)
|
bench_command.add_command(backup_all_sites)
|
||||||
bench_command.add_command(renew_lets_encrypt)
|
bench_command.add_command(renew_lets_encrypt)
|
||||||
bench_command.add_command(disable_production)
|
bench_command.add_command(disable_production)
|
||||||
|
@ -1,6 +1,5 @@
|
|||||||
# imports - standard imports
|
# imports - standard imports
|
||||||
import os
|
import os
|
||||||
import sys
|
|
||||||
|
|
||||||
# imports - third party imports
|
# imports - third party imports
|
||||||
import click
|
import click
|
||||||
@ -135,18 +134,6 @@ def renew_lets_encrypt():
|
|||||||
renew_certs()
|
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")
|
@click.command("backup-all-sites", help="Backup all sites in current bench")
|
||||||
def backup_all_sites():
|
def backup_all_sites():
|
||||||
from bench.utils.system import backup_all_sites
|
from bench.utils.system import backup_all_sites
|
||||||
|
Loading…
x
Reference in New Issue
Block a user