hi i'm trying to figure out the backup process. im trying the 'download backup' button which is supposed to copy the backup from /var/backup/site.tar.gz to /var/www/site.com/backup/site.tar.gz however, none of my sites on any servers have the /backup folder present so this just fails also i cannot create this /backup folder even as root it says permission denied so i can workaround this by changing the code in server/plugins-available/backup_plugin.inc.php to copy the file to /private which is always present, but i wondered if there is a way to fix this properly? thanks
This works on my ISPConfig server. The "Download backup" button press creates the backup directory and copies the file there. Your attempt to create it manually fails since the website directory is protected against alteration with chattr setting.
as @Taleman states, the backup folder doesn't exist until after you first choose to download an existing backup. you say it fails, does it actually give an error? or are you assuming it's failed because it doesn't immediately create the backup folder? does the backup in /var/backup? is this a mounted folder? if so, is the folder actually mounted when you click the download button?
hi ok thanks for replies. the backup folder is never created, i debugged this by reading this file server/plugins-available/backup_plugin.inc.php which has an if(file_exists( check for the backup folder. this doesnt exist so it skips the copy part. i cant find anywhere in the code where the create directory shld be happening, but it appears to not be being created when it should.
The if statement you refer to is for MongoDB backup only, it is not related to website backups. The backup and restore code for website backups is in the file that @nhybgtvfr mentioned.
yeah the issue is same for files or database backups. i know its running the code in server/plugins-available/backup_plugin.inc.php because i added an else echo 'backup folder not present' and it does print that. anyway i will continue with my workarounds thanks
The MongoDB section you referred to is not even used for database backups, it is not used at all, it's simply an unused code fragment. You can easily create the backup folder, just to mention as you claimed in the first post that it's not possible. You probably just missed disabling and re-enabling immutable attribute. chattr -i /var/www/clients/clientX/webY mkdir /var/www/clients/clientX/webY/backup chattr +i /var/www/clients/clientX/webY