Open Berndinox opened 3 years ago
I think that fix need to be done at "/cyberpanel/backup/backupManager.py" `Searching 21 files for ".tar.gz"
/home/netbos/cyberpanel/backup/backupManager.py:
366 else:
367 all_files = []
368: ext = ".tar.gz"
369
370 command = 'sudo chown -R cyberpanel:cyberpanel ' + path
...
589 return ACLManager.loadErrorJson()
590
591: path = "/home/" + domainName + "/backup/" + backup.fileName + ".tar.gz"
592 command = 'sudo rm -f ' + path
593 ProcessUtilities.executioner(command)
...
634 def restoreStatus(self, data=None):
635 try:
636: backupFile = data['backupFile'].strip(".tar.gz")
637
638 path = os.path.join("/home", "backup", data['backupFile'])
...
641 path = os.path.join("/home", "backup", backupFile)
642 elif os.path.exists(data['backupFile']):
643: path = data['backupFile'].strip(".tar.gz")
644 else:
645 dir = data['dir']
4 matches in 1 file `
`Searching 21 files for "backup/*.tar.gz"
0 matches
Searching 21 files for ".tar.gz"
/home/netbos/cyberpanel/backup/backupManager.py:
366 else:
367 all_files = []
368: ext = ".tar.gz"
369
370 command = 'sudo chown -R cyberpanel:cyberpanel ' + path
...
589 return ACLManager.loadErrorJson()
590
591: path = "/home/" + domainName + "/backup/" + backup.fileName + ".tar.gz"
592 command = 'sudo rm -f ' + path
593 ProcessUtilities.executioner(command)
...
634 def restoreStatus(self, data=None):
635 try:
636: backupFile = data['backupFile'].strip(".tar.gz")
637
638 path = os.path.join("/home", "backup", data['backupFile'])
...
641 path = os.path.join("/home", "backup", backupFile)
642 elif os.path.exists(data['backupFile']):
643: path = data['backupFile'].strip(".tar.gz")
644 else:
645 dir = data['dir']
4 matches in 1 file
Searching 3518 files for "it will detect all Back ups under /home/backup"
0 matches
Searching 3518 files for "it will detect all Back ups under"
/home/netbos/cyberpanel/backup/templates/backup/restore.html: 13
{% trans "This page can be used to restore your websites, Back up should be generated from CyberPanel Back up generation tool, it will detect all Back ups under /home/backup." %}
16/home/netbos/cyberpanel/locale/bn/LC_MESSAGES/django.po: 1000 msgid "" 1001 "This page can be used to restore your websites, Back up should be generated " 1002: "from CyberPanel Back up generation tool, it will detect all Back ups under " 1003 "/home/backup." 1004 msgstr ""
/home/netbos/cyberpanel/locale/br/LC_MESSAGES/django.mo:
Looks like the backup system needs to be updated to a new version, backup/backupManager.py needs to be updated, as well as plogical/backupUtilities.py to properly restore, and the template needs to be updated to select from a list of sites. Updating backupManager.py to have the proper domain does allow the files to be select, however the restore still fails.
facing same issue, can backup but unable to restore.
I can create a backup, fine! Its getting saved in
/home/DOMAIN/backup/MYBACKUP_DATE.tar.gz
But when trying to restore it, the page is saying:
it will detect all Back ups under /home/backup.
Thats the wrong path and a "normal" (non-admin) user will never be able to place the files there (without messing around with ACLs) - So atm a user has to connect via ssh to manually unpack and replace the files from backup, if necessary.
The concept of backup/restore seems not thought through to be honest.
PS: Overall i love CP!