servers:linux:nginx:piwigo
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
servers:linux:nginx:piwigo [2025/08/27 19:37] – Sean Rhone | servers:linux:nginx:piwigo [2025/08/27 20:15] (current) – Sean Rhone | ||
---|---|---|---|
Line 14: | Line 14: | ||
* [[linux: | * [[linux: | ||
- | * [[servers: | ||
* [[servers: | * [[servers: | ||
* [[servers; | * [[servers; | ||
+ | * [[servers: | ||
====== Dependencies ====== | ====== Dependencies ====== | ||
Line 346: | Line 346: | ||
WantedBy=timers.target</ | WantedBy=timers.target</ | ||
- | ====== | + | ====== |
- | + | ||
- | * Create backup archive on server and transfer to client computer | + | |
- | + | ||
- | ===== Server ===== | + | |
- | + | ||
- | ==== Stop Services ==== | + | |
- | + | ||
- | **** | + | |
- | + | ||
- | sudo systemctl stop nginx php-fpm | + | |
- | + | ||
- | ==== Backup Folder ==== | + | |
- | + | ||
- | **** | + | |
- | + | ||
- | cd '/ | + | |
- | + | ||
- | ==== Backup Database ==== | + | |
- | + | ||
- | **** | + | |
- | + | ||
- | sudo mariadb-dump --defaults-extra-file='/ | + | |
- | + | ||
- | ==== Start Services ==== | + | |
- | + | ||
- | **** | + | |
- | + | ||
- | sudo systemctl start nginx php-fpm | + | |
- | + | ||
- | ===== Client ===== | + | |
- | + | ||
- | ==== Transfer Files To Client ==== | + | |
- | + | ||
- | **** | + | |
- | + | ||
- | scp espionage724@192.168.1.152: | + | |
- | + | ||
- | ====== | + | |
===== Client ===== | ===== Client ===== | ||
Line 394: | Line 356: | ||
gunzip ~/' | gunzip ~/' | ||
- | ==== Transfer | + | ====== Files ====== |
- | **** | + | ===== Backup ===== |
- | + | ||
- | scp ~/' | + | |
- | + | ||
- | ==== Remove Files ==== | + | |
**** | **** | ||
- | | + | |
- | ===== Server | + | ===== scp ===== |
- | ==== Stop Services | + | ==== To Client Backup |
- | **** | + | |
+ | | ||
- | | + | |
- | ==== Remove Previous Folder | + | ==== To Server Restore |
- | **** | + | |
+ | | ||
- | | + | |
- | ==== Restore | + | ===== Restore |
**** | **** | ||
- | sudo tar -xvzf ~/' | + | |
- | ==== Drop Previous Database | + | ===== Clean-up ===== |
- | + | ||
- | sudo mariadb | + | |
- | + | ||
- | DROP DATABASE piwigo; | + | |
- | + | ||
- | FLUSH TABLES; | + | |
- | + | ||
- | EXIT | + | |
- | + | ||
- | ==== Re-create Databases ==== | + | |
- | + | ||
- | sudo mariadb | + | |
- | + | ||
- | CREATE DATABASE piwigo; | + | |
- | + | ||
- | EXIT | + | |
- | + | ||
- | ==== Restore Database | + | |
**** | **** | ||
- | | + | |
- | ==== Reapply Permissions | + | ====== Database ====== |
- | sudo mariadb | + | ===== Backup ===== |
- | + | ||
- | GRANT ALL PRIVILEGES ON piwigo.* to ' | + | |
- | + | ||
- | FLUSH PRIVILEGES; | + | |
- | + | ||
- | EXIT | + | |
- | + | ||
- | ==== Start Services | + | |
**** | **** | ||
- | sudo systemctl start nginx php-fpm | + | sudo mariadb-dump --single-transaction --quick ' |
- | ==== Remove Backups | + | ===== scp ===== |
- | * Verify that Piwigo works before running | + | ==== To Client Backup ==== |
- | | + | * Server back-up -> Client |
+ | | ||
- | ====== Database TODO ====== | + | scp espionage724@192.168.1.152: |
- | ===== Backup ===== | + | ==== To Server Restore |
- | **** | + | |
+ | | ||
- | | + | |
===== Restore ===== | ===== Restore ===== | ||
- | |||
- | sudo mariadb --execute=' | ||
sudo mariadb --execute=' | sudo mariadb --execute=' | ||
- | sudo mariadb ' | + | sudo mariadb ' |
- | + | ||
- | ==== Reapply Permissions ==== | + | |
- | * [[# | + | ==== Permissions ==== |
sudo mariadb | sudo mariadb | ||
+ | |||
+ | CREATE USER ' | ||
GRANT ALL PRIVILEGES ON piwigo.* to ' | GRANT ALL PRIVILEGES ON piwigo.* to ' | ||
Line 499: | Line 433: | ||
EXIT | EXIT | ||
+ | |||
+ | ===== Clean-up ===== | ||
+ | |||
+ | **** | ||
+ | |||
+ | rm -fv ~/' | ||
/usr/local/www/wiki/data/attic/servers/linux/nginx/piwigo.1756337867.txt.gz · Last modified: by Sean Rhone