Tagged: Restorations, Total Upkeep
-
AuthorPosts
-
February 12, 2024 at 9:34 am #124490FredGuest
Have installed Total upkeep premium on my develop server and am trying to move a back up to staging, but got file permission errors
Total Upkeep - Restoration failed Permission denied. Unable to restore the following file: /opt/bitnami/wordpress/./
Its a pretty basic installation and dont have many plugins yet as i want this to work first, have not been able to see any documentatiosn excpet this
https://github.com/bitnami/vms/issues/1174That gives the following recommendations
sudo chown -R bitnami:daemon /opt/bitnami/wordpress sudo find /opt/bitnami/wordpress -type d -exec chmod 775 {} \; sudo find /opt/bitnami/wordpress -type f -exec chmod 664 {} \; sudo chown -R bitnami:daemon /bitnami/wordpress sudo find /bitnami/wordpress -type d -exec chmod 775 {} \; sudo find /bitnami/wordpress -type f -exec chmod 664 {} \; sudo chmod 640 /bitnami/wordpress/wp-config.php
But that does not work, any recommendations or documentation we can follow to restore a basic backup
ThanksFebruary 12, 2024 at 9:48 am #124573Brad MarkleKeymasterTroubleshooting File Restoration Issues with Total Upkeep: The “.” File Name Scenario
It appears you’re encountering a unique issue with Total Upkeep where the restoration process is failing due to an attempt to restore a file named “.”. This might indicate a misunderstanding by the backup utility in handling system directories or files. The “.” typically represents the current directory in Unix-like operating systems, which should not be an object of restoration by itself. This issue could possibly be linked to the compressor used during the backup process.
Understanding Compressors
Total Upkeep utilizes different compressors to create backups, including PclZip, ZipArchive, and System Zip. Each compressor has its nuances, with some being more suited to certain hosting environments or specific use cases. For instance, System Zip generally offers faster compression with lower performance costs, while PHP-based Zip options (PclZip and ZipArchive) provide more flexibility.
Changing the Backup Compressor
Given the nature of your issue, switching the compressor might help. Here’s how you can adjust the compressor settings within Total Upkeep:
- Access Total Upkeep Settings: Navigate to Total Upkeep -> Settings -> Backup Process.
- Select Backup Compressor: Choose your preferred Backup Compressor among PclZip, ZipArchive, or System Zip.
- Save Settings: After selecting a different compressor, click Save Settings to apply the change.
- Test with a Manual Backup: It’s recommended to run a manual backup to verify the new compressor works as intended without encountering the “.” file issue.
Why Try a Different Compressor?
Switching compressors can resolve issues related to file handling and compression algorithms, potentially bypassing the problem causing the restoration failure. While System Zip is generally recommended for its efficiency, trying out PclZip or ZipArchive might yield different results that circumvent the peculiar “.” file restoration error.
Additional Steps
- Review Backup Contents: Before attempting restoration again, review the backup contents to ensure no system directories or placeholder files (like “.”) are included inadvertently.
- Consult Documentation: Visit our support page for more on changing compressors and troubleshooting backup issues: Change Backup Compressor.
February 12, 2024 at 12:53 pm #124575FredGuestThanks for getting back so quickly, after trying to change the backup process on AWS Lightsail (Bitnami) i can’t now back up… for example with system zip i get
`
[2024-02-12 15:09:45 UTC] Archiving of files did not complete successfully: Array
(
[error] => zip warning: Permission denied)
[2024-02-12 15:09:45 UTC] Archive filepath / size: /opt/bitnami/wordpress/wp-content/boldgrid_backup_lv8yneF9vHs6/boldgrid-backup-wp.XXXYYYZZZ.com-f2aac09f-20240212-150944.zip / 7661759 (7.31 MB)
`
Guessing this is down to file permissions, any idea what file permissions we need to change?The way Lightsail (Bitnami) works by default its located here
https://docs.bitnami.com/aws/apps/wordpress/administration/understand-file-permissions/#:~:text=Files%20and%20directories%20are%20owned,with%20permissions%20664%20by%20default.But in essence you have
`
Files and directories are owned by user bitnami and group daemon.
Directories are configured with permissions 775 by default.
Files are configured with permissions 664 by default.
`
Thx
February 12, 2024 at 1:04 pm #124602Brandon CKeymasterThanks Fred,
I think next we need to determine if you’re able to restore the previous backup zip file manually.
You simply need to:
- Connect to your hosting account via FTP, or by using a file manager in your hosting control panel.
- Upload your backup file to your backups directory, typically in Home -> boldgrid_backup.
- Log into your WordPress Dashboard, and navigate to Total Upkeep -> Upload Backup.
- Navigate to Total Upkeep -> Backup Archives.
- You will now see your backup file listed in your Web Server backups.
- Click View Details -> Restore.
Whether or not that works will help us troubleshoot further. Thanks Fred, we’re looking forward to assisting you further with this!
February 12, 2024 at 3:28 pm #124611FredGuestThanks you for your second recommendation, however after changing the format i know get
Permission denied. Unable to restore the following file: /opt/bitnami/wordpress/index.php
any guide on what file permissions i need to set?
February 13, 2024 at 8:24 am #124624FredGuestAfter doing soem more research and changed the config of the source server, using system zip (comp level 6) i can zip the file, however when I try to load it on destination server I know get
Permission denied. Unable to restore the following file: /opt/bitnami/wordpress/index.php
Looking at Binami forum it looks liek i am not the first and they have the following comments
https://github.com/bitnami/vms/issues/1174#issuecomment-1748407786I do not know what WordPress is trying to do with that file. Apache (daemon user and group) has permissions to read and write the file (and delete it if needed) and the entire /bitnami/wordpress and /opt/bitnami/wordpress directories. I suggest you contact the Total Upkeep plugin's developers to know what's wrong with the backup recovery. The plugin is probably trying to create a temp directory/file and it can't do it. You will need to ensure daemon user/group has write permissions over that temp folder.
Could you please confirm what the process is for the plugin and if we somehow needs to give a temp folder permissions access? (and ideally what)
ThanksFebruary 13, 2024 at 8:33 am #124629Brad MarkleKeymasterHi Fred,
We’re trying to figure out if the archive is not being restored because of something in the archive itself, or something Total Upkeep is doing during the restoration process.
One way to help us understand this is to take Total Upkeep out of the equation.
Are you able to upload the archive to the WordPress directory and unzip the file manually? For example, if you’re in a GUI then right click on the zip and choose extract, or if you’re in the CLI then use the unzip command.
This will overwrite all the files in the WordPress directory, however it won’t actually restore the database (so technically not a full restoration).
If it overwrites the files without an error, then we can begin focusing on how Total Upkeep restores the archive, rather than the archive itself.
February 13, 2024 at 10:02 am #124631FredGuestThanks for getting back.
So i tried the following
1) Created a backup on the develop machine
2) Uploaded zip file via media library on staging
3) Tried to copy zip folder to root (got errorcannot create regular file '../boldgrid-backup-wp.develop.XXX.com-f2aac09f-20240213-1 04934.zip': Permission denied
when doing a ls -la on root wordpress root i get
drwxr-xr-x 5 root root 4096 Jan 27 04:13 . drwxr-xr-x 19 root root 4096 Feb 13 11:35 .. drwxrwxr-x 3 root root 4096 Jan 27 04:12 mariadb drwxrwxr-x 2 daemon root 4096 Jan 27 04:13 phpmyadmin drwxrwxr-x 4 bitnami daemon 4096 Feb 13 14:20 wordpress
When doing a whoami i get
bitnami
Any ideas welcome
February 13, 2024 at 10:05 am #124633Brandon CKeymasterHey Fred, thanks for continuing to work with us.
If you’re trying to move a zip from one environment to another, you can try getting a download link. Please refer to this Total Upkeep migrations guide to learn more about creating a download link.
It looks like you have has ssh access, with SSH you can use wget on the download link to download the zip file from the command line.
-
AuthorPosts
- The topic ‘Total upkeep and bitnami on AWS Lightsail getting file permissions error’ is closed to new replies.