[minor] return backup generator obj from wnf.backup
This commit is contained in:
parent
c95f18f2ad
commit
ebe0e7d64b
2 changed files with 5 additions and 1 deletions
|
|
@ -140,6 +140,7 @@ def scheduled_backup(older_than=6, ignore_files=False):
|
|||
|
||||
from webnotes.utils import now
|
||||
print "backup taken -", odb.backup_path_db, "- on", now()
|
||||
return odb
|
||||
|
||||
def new_backup(older_than=6, ignore_files=False):
|
||||
delete_temp_backups(older_than=168)
|
||||
|
|
|
|||
5
wnf.py
5
wnf.py
|
|
@ -293,7 +293,10 @@ def watch():
|
|||
def backup(site=None, with_files=False):
|
||||
from webnotes.utils.backups import scheduled_backup
|
||||
webnotes.connect(site=site)
|
||||
scheduled_backup(ignore_files=not with_files)
|
||||
odb = scheduled_backup(ignore_files=not with_files)
|
||||
if __name__ == "__main__":
|
||||
print "backup taken -", odb.backup_path_db, "- on", now()
|
||||
return odb
|
||||
|
||||
@cmd
|
||||
def docs():
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue