Quellcode durchsuchen

only tar for backup (no tar+gzip)

version-14
Rushabh Mehta vor 12 Jahren
Ursprung
Commit
40470d2489
2 geänderte Dateien mit 3 neuen und 2 gelöschten Zeilen
  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 Datei anzeigen

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


wn.ui.toolbar.download_backup = 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) {}); $c('webnotes.utils.backups.get_backup',{},function(r,rt) {});
return false; return false;
} }


+ 2
- 2
webnotes/utils/backups.py Datei anzeigen

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


def zip_files(self): def zip_files(self):
files_path = os.path.join(os.path.dirname(os.path.abspath(conf.__file__)), 'public', 'files') 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) err, out = webnotes.utils.execute_in_shell(cmd_string)
def take_dump(self): def take_dump(self):


Laden…
Abbrechen
Speichern