CPANEL-35244 - backup_user_list API call not working with weekly backups
Hello,
We are trying to gather restore points for backup monitoring using backup_user_list API call. The issue is that while daily and monthly backups provide correct output, calls involving weekly backups return the following:
Backup directory is set to /backup and it contains all types of backups. So there's nothing different in ownership/permissions for weekly and monthly backup directories for example. We have also examined .master.meta files in several backup directories and they seem to be intact (no content difference, except for order: sometimes 'accounts list' metadata goes before backup summary (date, status, etc.) and sometimes it's printed before backup summary section(we can attach examples if needed)) Can anyone please point us in the right direction regarding this odd issue?
# /usr/local/cpanel/bin/whmapi1 backup_user_list restore_point=2020-08-16
---
metadata:
command: backup_user_list
reason: "Invalid restore point: 2020-08-16"
result: 1
version: 1
Backup directory is set to /backup and it contains all types of backups. So there's nothing different in ownership/permissions for weekly and monthly backup directories for example. We have also examined .master.meta files in several backup directories and they seem to be intact (no content difference, except for order: sometimes 'accounts list' metadata goes before backup summary (date, status, etc.) and sometimes it's printed before backup summary section(we can attach examples if needed)) Can anyone please point us in the right direction regarding this odd issue?
-
Can you show me what is listed in /backup/2020-08-16/
0 -
Hi, thank you for your reply. 2020-08-16 backup was overwritten so I will show you another one weekly: [CODE=bash]# whmapi1 backup_date_list --- data: backup_set: - 2020-09-10 - 2020-09-08 - 2020-09-06 - 2020-09-05 - 2020-09-03 - 2020-09-01 - 2020-08-30 - 2020-08-23 metadata: command: backup_date_list reason: OK result: 1 version: 1 # whmapi1 backup_user_list restore_point=2020-08-30 --- metadata: command: backup_user_list reason: "Invalid restore point: 2020-08-30" result: 1 version: 1 # stat /backup/weekly/2020-08-30/ File: "/backup/weekly/2020-08-30/" Size: 0 Blocks: 0 IO Block: 16384 directory Device: 28h/40d Inode: 50924650 Links: 2 Access: (0755/drwxr-xr-x) Uid: ( 0/ root) Gid: ( 0/ root) Access: 2020-08-30 02:00:02.415626000 +0200 Modify: 2020-08-30 02:00:02.468762000 +0200 Change: 2020-08-30 02:00:02.468762000 +0200 Birth: -
As you may see there is no folder /backup/2020-08-30/ but /backup/weekly/2020-08-30/ is there and backups are also there, but WHM API for some reason don't see them.0 -
Hello, I think, I figured out the behavior of this bug. WHM API for some reason don't expect backups at the /backups/weekly folder. I did some tests and found out that the search is performed only in /backup and /backup/monthly folders when I call whmapi1 backup_user_list restore_point= command. Below I will attach an example. Maybe someone knows a place where I can change the code to include /backup/weekly folder? It would also be great if the cPanel developers fix this bug in next versions. Thank you. Let's say we have a weekly backup from 2020-10-04 and it is located at /backup/weekly folder. When I call whmapi1 backup_user_list restore_point=2020-10-04 I'm receiving "Invalid restore point": [CODE=bash]# whmapi1 backup_user_list restore_point=2020-10-04 --- metadata: command: backup_user_list reason: "Invalid restore point: 2020-10-04" result: 1 version: 1
But if I append correct path to the command I will receive correct response: [CODE=bash]# whmapi1 backup_user_list restore_point=weekly/2020-10-04 --- data: user: - status: active username: user metadata: command: backup_user_list reason: OK result: 1 version: 10 -
Hi, I have the same problem! Ignacio 0 -
@imorandin - are you seeing the "invalid restore point" errors as well? 0 -
@cPRex : yes, that's correct. To "fix" the problem temporarily in my script I did this: [CODE=bash]if [ -d "/backup/$DATE/accounts/$USER" ] || [ -d "/backup/weekly/$DATE/accounts/$USER" ] || [ -d "/backup/monthly/$DATE/accounts/$USER" ]; then # THE BACKUP DOES EXIST, DO SOMETHING fi 0 -
Thanks for the additional details. I'm doing some testing on this today and I'll reply with an update once I have more details. 0 -
Just posting an update - this will be included in one of the future 92 builds. I don't have an exact version number at this time, but it should be the next build that goes public, which will be 92.0.7. 0 -
Just providing an update on this - case CPANEL-35244 has been resolved and will be included in the next release of cPanel - 92.0.7 :D 0
Please sign in to leave a comment.
Comments
10 comments