Ver a proveniência

only tar for backup (no tar+gzip)

version-14
Rushabh Mehta há 12 anos
ascendente
cometimento
40470d2489
2 ficheiros alterados com 3 adições e 2 eliminações
  1. +1
    -0
      public/js/wn/ui/toolbar/toolbar.js
  2. +2
    -2
      webnotes/utils/backups.py

+ 1
- 0
public/js/wn/ui/toolbar/toolbar.js Ver ficheiro

@@ -116,6 +116,7 @@ wn.ui.toolbar.clear_cache = function() {
}

wn.ui.toolbar.download_backup = function() {
msgprint("Your download is being built, this may take a few moments...");
$c('webnotes.utils.backups.get_backup',{},function(r,rt) {});
return false;
}


+ 2
- 2
webnotes/utils/backups.py Ver ficheiro

@@ -72,7 +72,7 @@ class BackupGenerator:
#Generate a random name using today's date and a 8 digit random number
for_db = todays_date + "_" + random_number + "_database.sql.gz"
for_files = todays_date + "_" + random_number + "_files.tar.gz"
for_files = todays_date + "_" + random_number + "_files.tar"
backup_path = get_backup_path()
self.backup_path_db = os.path.join(backup_path, for_db)
self.backup_path_files = os.path.join(backup_path, for_files)
@@ -89,7 +89,7 @@ class BackupGenerator:

def zip_files(self):
files_path = os.path.join(os.path.dirname(os.path.abspath(conf.__file__)), 'public', 'files')
cmd_string = """tar -czf %s %s""" % (self.backup_path_files, files_path)
cmd_string = """tar -cf %s %s""" % (self.backup_path_files, files_path)
err, out = webnotes.utils.execute_in_shell(cmd_string)
def take_dump(self):


Carregando…
Cancelar
Guardar