MAAS backup and restore documentation omits permission preservation

Bug #1718561 reported by Kellen Renshaw
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
MAAS
Fix Released
Medium
Graham Morrison

Bug Description

The MAAS docs for backup and restore at https://docs.ubuntu.com/maas/2.2/en/manage-backup have a note reminding you to ensure the permissions are correct on the restored files. However, the commands given to copy the files back do not preserve the permissions.

It might be better to use the "-p" flag on cp and tar commands given to ensure that the permissions are preserved.

This also affects the 2.1 and 2.0 versions of the documentation.

For reference, this is an example that I used to successfully restore a MAAS server:
sudo reboot
# Install MAAS
sudo apt install maas
# Extract backup, preserving permissions
sudo tar xvzpf backup.tgz
# Stop MAAS services prior to restore
sudo systemctl stop maas-dhcpd
sudo systemctl stop maas-rackd
sudo systemctl stop maas-regiond
# Restore MAAS DB
sudo -u postgres psql -f maas_db.sql postgres
# Backup "new" MAAS config, just in case
sudo mv /etc/maas /etc/_maas
sudo mv /var/lib/maas /var/lib/_maas
# Restore previous MAAS configuration
sudo cp -prf var/lib/maas /var/lib/
sudo cp -prf etc/maas /etc
# Verify MAAS services start on boot correctly
sudo reboot

Tags: doc
Revision history for this message
Graham Morrison (morrisong) wrote :

Thanks for this. I've duplicated the issue on the docs GH repo and we'll update the docs asap:

https://github.com/CanonicalLtd/maas-docs/issues/580

Changed in maas:
status: New → Confirmed
importance: Undecided → Medium
status: Confirmed → Fix Committed
Revision history for this message
Newell Jensen (newell-jensen) wrote :

Graham,

Marking as fix committed as this has already merged. Thanks!

Changed in maas:
assignee: nobody → Graham Morrison (morrisong)
milestone: none → 2.3.1
Changed in maas:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.