More directory twiddling
This commit is contained in:
parent
a0095ec7fd
commit
e56daa5f7f
|
@ -909,14 +909,14 @@ function create_restore_script {
|
||||||
echo ' fi' >> /usr/bin/$RESTORE_SCRIPT_NAME
|
echo ' fi' >> /usr/bin/$RESTORE_SCRIPT_NAME
|
||||||
echo " rsyncrypto -v -d -r $USB_MOUNT/backup/mariadb /root/tempmariadb $USB_MOUNT/backup/mariadb.keys $BACKUP_CERTIFICATE" >> /usr/bin/$RESTORE_SCRIPT_NAME
|
echo " rsyncrypto -v -d -r $USB_MOUNT/backup/mariadb /root/tempmariadb $USB_MOUNT/backup/mariadb.keys $BACKUP_CERTIFICATE" >> /usr/bin/$RESTORE_SCRIPT_NAME
|
||||||
echo ' echo "Get the MariaDB password from the backup"' >> /usr/bin/$RESTORE_SCRIPT_NAME
|
echo ' echo "Get the MariaDB password from the backup"' >> /usr/bin/$RESTORE_SCRIPT_NAME
|
||||||
echo ' if [ ! -f /root/tempmariadb/usb/backup/mariadb/db ]; then' >> /usr/bin/$RESTORE_SCRIPT_NAME
|
echo ' if [ ! -f /root/tempmariadb/usb/backup/mariadb/tempmariadb/db ]; then' >> /usr/bin/$RESTORE_SCRIPT_NAME
|
||||||
echo ' echo "MariaDB password file not found"' >> /usr/bin/$RESTORE_SCRIPT_NAME
|
echo ' echo "MariaDB password file not found"' >> /usr/bin/$RESTORE_SCRIPT_NAME
|
||||||
echo ' exit 495' >> /usr/bin/$RESTORE_SCRIPT_NAME
|
echo ' exit 495' >> /usr/bin/$RESTORE_SCRIPT_NAME
|
||||||
echo ' fi' >> /usr/bin/$RESTORE_SCRIPT_NAME
|
echo ' fi' >> /usr/bin/$RESTORE_SCRIPT_NAME
|
||||||
echo ' BACKUP_MARIADB_PASSWORD=$(</root/tempmariadb/usb/backup/mariadb/db)' >> /usr/bin/$RESTORE_SCRIPT_NAME
|
echo ' BACKUP_MARIADB_PASSWORD=$(</root/tempmariadb/usb/backup/mariadb/tempmariadb/db)' >> /usr/bin/$RESTORE_SCRIPT_NAME
|
||||||
echo ' echo "Restore the MariaDB user table"' >> /usr/bin/$RESTORE_SCRIPT_NAME
|
echo ' echo "Restore the MariaDB user table"' >> /usr/bin/$RESTORE_SCRIPT_NAME
|
||||||
echo ' mysql -u root --password=$DATABASE_PASSWORD mysql -o < /root/tempmariadb/usb/backup/mariadb/mysql.sql' >> /usr/bin/$RESTORE_SCRIPT_NAME
|
echo ' mysql -u root --password=$DATABASE_PASSWORD mysql -o < /root/tempmariadb/usb/backup/mariadb/tempmariadb/mysql.sql' >> /usr/bin/$RESTORE_SCRIPT_NAME
|
||||||
echo ' shred -zu /root/tempmariadb/usb/backup/mariadb/db' >> /usr/bin/$RESTORE_SCRIPT_NAME
|
echo ' shred -zu /root/tempmariadb/usb/backup/mariadb/tempmariadb/db' >> /usr/bin/$RESTORE_SCRIPT_NAME
|
||||||
echo ' rm -rf /root/tempmariadb' >> /usr/bin/$RESTORE_SCRIPT_NAME
|
echo ' rm -rf /root/tempmariadb' >> /usr/bin/$RESTORE_SCRIPT_NAME
|
||||||
echo ' echo "Apply the new MariaDB user table"' >> /usr/bin/$RESTORE_SCRIPT_NAME
|
echo ' echo "Apply the new MariaDB user table"' >> /usr/bin/$RESTORE_SCRIPT_NAME
|
||||||
echo ' mysql -u root --password=$DATABASE_PASSWORD "flush privileges;"' >> /usr/bin/$RESTORE_SCRIPT_NAME
|
echo ' mysql -u root --password=$DATABASE_PASSWORD "flush privileges;"' >> /usr/bin/$RESTORE_SCRIPT_NAME
|
||||||
|
|
Loading…
Reference in New Issue