usmannasir / cyberpanel

Cyber Panel - The hosting control panel for OpenLiteSpeed
GNU General Public License v3.0
1.53k stars 591 forks source link

Backups Failed #1185

Closed eakteam closed 8 months ago

eakteam commented 8 months ago

[01.19.2024_09-40-54] /home/example.com/backup/ [01.19.2024_09-40-54] /home/example.com/backup/backup-example.com-01.19.2024_09-40-54 [01.19.2024_09-41-01] Aborted, Failed to run cp command during backup generation..[365] [5009]

usmannasir commented 8 months ago

Need following details

**Important**
Do not create a new issue if there is already an issue similar(even if nearly) to yours already posted by someone. Just post an update of your issue in that old issue. At this moment CyberPanel only have few contributors. Please do not create any maintenance burden.

**Describe the bug**
A clear and concise description of what the bug is. Please include as much information as possible in your issue report, such as the configuration of your server and any troubleshooting steps that you've already performed.

**NOTE: Do not include any personal or sensitive information, such as email addresses or passwords.**

**To Reproduce**
What steps did you take when the issue occurred? 
1. Ex.: Click on the "Websites" tab.
2. Ex.: Click on "Create Website".
3. Ex.: Attempted to create a website and received an error.

**Expected behavior**
A clear and concise description of what you expected to happen.

**Screenshots**
If applicable, add screenshots to help explain your problem.

**Operating system:**
Please enter your answer here (e.g. Ubuntu 20.04 LTS)

**CyberPanel version:**
Please enter your answer here (e.g. 2.1.1). 

**Additional context**
If there is anything else that you'd like us to know about this issue that will help us diagnose and troubleshoot more effectively, such as links to forum posts or other discussions, please feel free to share here.
eakteam commented 8 months ago

Need following details

**Important**
Do not create a new issue if there is already an issue similar(even if nearly) to yours already posted by someone. Just post an update of your issue in that old issue. At this moment CyberPanel only have few contributors. Please do not create any maintenance burden.

**Describe the bug**
A clear and concise description of what the bug is. Please include as much information as possible in your issue report, such as the configuration of your server and any troubleshooting steps that you've already performed.

**NOTE: Do not include any personal or sensitive information, such as email addresses or passwords.**

**To Reproduce**
What steps did you take when the issue occurred? 
1. Ex.: Click on the "Websites" tab.
2. Ex.: Click on "Create Website".
3. Ex.: Attempted to create a website and received an error.

**Expected behavior**
A clear and concise description of what you expected to happen.

**Screenshots**
If applicable, add screenshots to help explain your problem.

**Operating system:**
Please enter your answer here (e.g. Ubuntu 20.04 LTS)

**CyberPanel version:**
Please enter your answer here (e.g. 2.1.1). 

**Additional context**
If there is anything else that you'd like us to know about this issue that will help us diagnose and troubleshoot more effectively, such as links to forum posts or other discussions, please feel free to share here.

Describe the bug Backup Failed to create

To Reproduce What steps did you take when the issue occurred?

  1. Click on the "Backup" tab.
  2. Click on "Create Backup".
  3. Trying to create backup of specific site on Home Destination

Expected behavior Backup should succeed and produce files at the right place but it creates an archive with 0 bytes.

Screenshots Backup Failed

Cyber Panel Main Log File

[01.19.2024_09-40-54] /home/example.com/backup/
[01.19.2024_09-40-54] /home/example.com/backup/backup-example.com-01.19.2024_09-40-54
[01.19.2024_09-41-01] Aborted, Failed to run cp command during backup generation..[365] [5009]

Operating system: Ubuntu 22.04 LTS

CyberPanel version: 2.3.4

usmannasir commented 8 months ago

do you have enough space on server?

eakteam commented 8 months ago

do you have enough space on server?

Yes, i have 500Gb nvme2 and using about 30-50GGb in total with 17+ sites. The site i want to backup is no more than 5Gb

usmannasir commented 8 months ago

Can you help to share debug logs from main CyberPanel log file ? you can turn on debug logs using touch /usr/local/CyberCP/debug

then create backup and share logs from main log file.

eakteam commented 8 months ago

Can you help to share debug logs from main CyberPanel log file ? you can turn on debug logs using touch /usr/local/CyberCP/debug

then create backup and share logs from main log file.

[01.20.2024_07-21-11] fuaMHr+1/wxx0VdBLr3Wur8t6aQj5IeZsudo chmod 755 /home/backup
[01.20.2024_07-21-17] fuaMHr+1/wxx0VdBLr3Wur8t6aQj5IeZsudo rm -f /home/*******.com/backup/backup-*******.com-01.20.2024_05-45-24.tar.gz
[01.20.2024_07-21-18] fuaMHr+1/wxx0VdBLr3Wur8t6aQj5IeZ-u *****3993 mkdir -p /home/*******.com/backup/backup-*******.com-01.20.2024_07-21-18
[01.20.2024_07-21-18] fuaMHr+1/wxx0VdBLr3Wur8t6aQj5IeZ-u *****3993 touch /home/*******.com/backup/status
[01.20.2024_07-21-18] Expecting value: line 1 column 1 (char 0). [setupConnection:75]
[01.20.2024_07-21-18] fuaMHr+1/wxx0VdBLr3Wur8t6aQj5IeZ-u *****3993 echo 'Setting up meta data..' > /home/*******.com/backup/status
[01.20.2024_07-21-18] Creating meta for *******.com.
[01.20.2024_07-21-18] Path to meta file /tmp/1040
[01.20.2024_07-21-18] fuaMHr+1/wxx0VdBLr3Wur8t6aQj5IeZ-u *****3993 echo 'Meta data is ready..' > /home/*******.com/backup/status
[01.20.2024_07-21-18] fuaMHr+1/wxx0VdBLr3Wur8t6aQj5IeZsudo chown *****3993:*****3993 /tmp/1040
[01.20.2024_07-21-18] /home/*******.com/backup/
[01.20.2024_07-21-18] /home/*******.com/backup/backup-*******.com-01.20.2024_07-21-18
[01.20.2024_07-21-18] fuaMHr+1/wxx0VdBLr3Wur8t6aQj5IeZ-u *****3993  nice -n 10 /usr/local/CyberCP/bin/python /usr/local/CyberCP/plogical/backupUtilities.py startBackup --tempStoragePath /home/*******.com/backup/backup-*******.com-01.20.2024_07-21-18 --backupName backup-*******.com-01.20.2024_07-21-18 --backupPath /home/*******.com/backup/ --backupDomain *******.com --metaPath /tmp/1040
[01.20.2024_07-21-26] Aborted, Failed to run cp command during backup generation..[365] [5009]

[01.20.2024_07-21-27] fuaMHr+1/wxx0VdBLr3Wur8t6aQj5IeZ-u *****3993  rm -f Aborted, Failed to run cp command during backup generation..[365] [5009]

[01.20.2024_07-21-27] fuaMHr+1/wxx0VdBLr3Wur8t6aQj5IeZ-u *****3993  rm -f /home/*******.com/backup/backupFileName
[01.20.2024_07-21-27] fuaMHr+1/wxx0VdBLr3Wur8t6aQj5IeZ-u *****3993  rm -f /home/*******.com/backup/pid
usmannasir commented 8 months ago

Can you show output of df -h ?

eakteam commented 8 months ago

Can you show output of df -h ?

root@eakteam / # df -h
Filesystem      Size  Used Avail Use% Mounted on
tmpfs           6.3G  1.1M  6.3G   1% /run
/dev/md2        436G   45G  370G  11% /
tmpfs            32G  106M   32G   1% /dev/shm
tmpfs           5.0M     0  5.0M   0% /run/lock
/dev/loop0      1.5G  2.8M  1.4G   1% /tmp
/dev/md1        989M  255M  684M  28% /boot
tmpfs           6.3G     0  6.3G   0% /run/user/0
eakteam commented 8 months ago

Something else, when we create destination at Backup->Add/Delete Destinations e.x I created a destination at /home/webackup , why can't choose that custom directory when want to create all websites backup to that directory manually?

The destination is not showing when trying Backup->Create Backup->Select Destinations This is very helpful since we need all the website's backups to be in that particular directory and then we can upload that whole directory somewhere else, preferable zipped.

eakteam commented 8 months ago

According to this post: https://community.cyberpanel.net/t/aborted-failed-to-run-cp-command-during-backup-generation-365-5009/38141 managed to solve it by going to the directory of the website including subdomains and running fix file permission from file manager.

eakteam commented 8 months ago

@usmannasir but about the custom destination, it is not working as i said above.

usmannasir commented 8 months ago

Yes I was about to say that click 'Fix Permissions' from file manager, because only the simple cp command was failing.

According to this post: https://community.cyberpanel.net/t/aborted-failed-to-run-cp-command-during-backup-generation-365-5009/38141 managed to solve it by going to the directory of the website including subdomains and running fix file permission from file manager.

eakteam commented 8 months ago

Yes I was about to say that click 'Fix Permissions' from file manager, because only the simple cp command was failing.

According to this post: https://community.cyberpanel.net/t/aborted-failed-to-run-cp-command-during-backup-generation-365-5009/38141 managed to solve it by going to the directory of the website including subdomains and running fix file permission from file manager.

How to disable debug mode which i activated for debugging purposes before: touch /usr/local/CyberCP/debug?

usmannasir commented 8 months ago

rm /usr/local/CyberCP/debug