mirror of
https://github.com/YunoHost/moulinette.git
synced 2024-09-03 20:06:31 +02:00
Init backup functions
This commit is contained in:
parent
19e730f5e3
commit
aecf43f259
2 changed files with 30 additions and 36 deletions
|
@ -352,46 +352,19 @@ app:
|
||||||
|
|
||||||
|
|
||||||
#############################
|
#############################
|
||||||
# Repository #
|
# Backup #
|
||||||
#############################
|
#############################
|
||||||
repo:
|
backup:
|
||||||
category_help: Manage app repositories
|
category_help: Manage backups
|
||||||
actions:
|
actions:
|
||||||
|
|
||||||
### repo_list()
|
### backup_init()
|
||||||
list:
|
init:
|
||||||
action_help: List repositories
|
action_help: Init Tahoe-LAFS configuration
|
||||||
arguments:
|
arguments:
|
||||||
-f:
|
--helper:
|
||||||
full: --filter
|
help: Init as a helper node rather than a "helped" one
|
||||||
help: LDAP filter used to search
|
action: store_true
|
||||||
-l:
|
|
||||||
full: --limit
|
|
||||||
help: Maximum number of repository fetched
|
|
||||||
-o:
|
|
||||||
full: --offset
|
|
||||||
help: Starting number for repository fetching
|
|
||||||
|
|
||||||
### repo_add()
|
|
||||||
add:
|
|
||||||
action_help: Add app repository
|
|
||||||
arguments:
|
|
||||||
url:
|
|
||||||
help: URL of the repository
|
|
||||||
-n:
|
|
||||||
full: --name
|
|
||||||
help: Unique name of the repository
|
|
||||||
|
|
||||||
### repo_remove()
|
|
||||||
remove:
|
|
||||||
action_help: Remove repository
|
|
||||||
arguments:
|
|
||||||
repo:
|
|
||||||
help: Name or URL of the repository
|
|
||||||
|
|
||||||
### repo_update()
|
|
||||||
update:
|
|
||||||
action_help: Update app list from the repositories
|
|
||||||
|
|
||||||
|
|
||||||
#############################
|
#############################
|
||||||
|
|
21
yunohost_backup.py
Normal file
21
yunohost_backup.py
Normal file
|
@ -0,0 +1,21 @@
|
||||||
|
# -*- coding: utf-8 -*-
|
||||||
|
|
||||||
|
import os
|
||||||
|
import sys
|
||||||
|
import json
|
||||||
|
import yaml
|
||||||
|
import glob
|
||||||
|
from yunohost import YunoHostError, YunoHostLDAP, validate, colorize, win_msg
|
||||||
|
|
||||||
|
def backup_init(helper=False):
|
||||||
|
"""
|
||||||
|
Init Tahoe-LAFS configuration
|
||||||
|
|
||||||
|
Keyword arguments:
|
||||||
|
helper -- Create a helper node rather than a "helped" one
|
||||||
|
|
||||||
|
Returns:
|
||||||
|
Win | Fail
|
||||||
|
|
||||||
|
"""
|
||||||
|
pass
|
Loading…
Add table
Reference in a new issue