diff --git a/webnotes/utils/backups.py b/webnotes/utils/backups.py index caa43dd4f1..fa943a2e24 100644 --- a/webnotes/utils/backups.py +++ b/webnotes/utils/backups.py @@ -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) diff --git a/wnf.py b/wnf.py index b8cf0b8f4f..ae814898dc 100755 --- a/wnf.py +++ b/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():