amoozesh98com
Verified User
- Joined
- Mar 8, 2015
- Messages
- 21
Hey everyone,
I'm developing a WHMCS module for our DirectAdmin servers and I've hit a wall. The goal is to let our users see what backup files are available on the remote FTP server (the one configured in Admin Backup/Reseller Backup) so they can request a specific restore date via a support ticket.
Everything works fine for local backups – I can get the settings via CMD_API_ADMIN_BACKUP?json=yes and even list the files. But for remote FTP backups, the API returns all the FTP connection details except the actual password. It just shows XXXXXXXXXX or an empty string for ftp_password. I've tried:
I'm running the latest Evolution skin, and the backup cron is working perfectly (I can see the backup progress and files in the DA panel). I just need a way to expose that file list to my module so users can pick a backup date for restore.
Any pointers would be greatly appreciated. If there's truly no way, I'll just have to ask the admin to manually enter the FTP password into a custom field, but that's not ideal.
Thanks in advance!
I'm developing a WHMCS module for our DirectAdmin servers and I've hit a wall. The goal is to let our users see what backup files are available on the remote FTP server (the one configured in Admin Backup/Reseller Backup) so they can request a specific restore date via a support ticket.
Everything works fine for local backups – I can get the settings via CMD_API_ADMIN_BACKUP?json=yes and even list the files. But for remote FTP backups, the API returns all the FTP connection details except the actual password. It just shows XXXXXXXXXX or an empty string for ftp_password. I've tried:
- CMD_API_ADMIN_BACKUP (raw & JSON) – password masked.
- CMD_API_ADMIN_BACKUP_MODIFY?cron=2 – same.
- CMD_API_USER_BACKUP and CMD_API_SITE_BACKUP – either empty password or "You do not own that domain".
- Logging in with a session cookie and parsing the HTML of the backup page – the password field is still XXXXXXXXXX and obviously the browser just shows dots.
- Task queue, cron jobs API – no password there either.
- Even trying to read the config files via the file editor API (CMD_API_FILE_EDITOR) just redirects to the login page.
I'm running the latest Evolution skin, and the backup cron is working perfectly (I can see the backup progress and files in the DA panel). I just need a way to expose that file list to my module so users can pick a backup date for restore.
Any pointers would be greatly appreciated. If there's truly no way, I'll just have to ask the admin to manually enter the FTP password into a custom field, but that's not ideal.
Thanks in advance!