This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Filename: HttpServer.cs | |
| // Author: Benjamin N. Summerton <define-private-public> | |
| // License: Unlicense (http://unlicense.org/) | |
| using System; | |
| using System.IO; | |
| using System.Text; | |
| using System.Net; | |
| using System.Threading.Tasks; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| // source https://stackoverflow.com/a/12245044/3254912 | |
| set_time_limit(0); | |
| $file = array(); | |
| $file['name'] = 'image.JPG'; | |
| $file['size'] = filesize($file['name']); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| # Backup file name and location | |
| BACKUP_DIR="/path/to/backup" | |
| BACKUP_FILE="$BACKUP_DIR/grafana_backup_$(date +%Y%m%d_%H%M%S).zip" | |
| # Files and directories to be backed up | |
| GRAPHANA_DB="/var/lib/grafana/grafana.db" | |
| GRAFANA_CONF="/etc/grafana/grafana.ini" | |
| GRAFANA_PLUGINS="/var/lib/grafana/plugins" |
1. Locate Current Data Directory
Find the current data directory (default: /var/lib/pgsql/13/data):
sudo -u postgres psql -c "SHOW data_directory;"2. Stop PostgreSQL Service
sudo systemctl stop postgresql-133. Move Data to the New Location
OlderNewer