The Ultimate Guide to Local AI in Obsidian (2026)
Stop treating Obsidian like a basic notepad. Here is how to upgrade your vault with an intelligent local AI that reads, understands, and organizes your work—running 100% locally with full privacy.
Add BrightAnswers.ai
It took Armies of people to make this possible, – I thank you all.
I now have this note to test out:
How to Backup a WordPress Site & Restore on Local Linux
This guide explains how to:
- Backup an existing WordPress site,
- Restore it later, e.g., for testing or migration.
Prerequisites
Before proceeding, confirm the following are in place:
- SSH/SFTP access to your WordPress host (for production backups).
- A local Linux server (e.g., Ubuntu) where restores will occur.
- Basic command-line proficiency, using tools like
wget,tar,scpfor backups, and database updates.
Step 1: Backup the WordPress Site
A full backup encompasses:
- Database (mySQL or MariaDB).
- WordPress files/directories.
We rely on manual scripting (recommended for control) via terminal commands.
1. Generate Database Backup
Begin by securing your current database records:
# Replace db, user, password, host accordingly.
mysql> USE wordpress;
# Display tables within the active database.
mysql> SHOW TABLES;
# Store all table contents into an SQL dump (suppresses output).
# Paste your database username and password when prompted.
myql> mysqldump -uuser -pdbname > db_backup.sql
# Replace with real credentials:
# Enter password: [type it]
# This action will prompt for confirmation.
Proceed only if the dump was saved successful.
2. Backup File System (Using tar + gzip)
For remote host backups, prevent partial downloads by compressing files. Here’s a script to automate this:
- Generate and install public/private SSH keys (place the private key under
~/.ssh/id_rsa). - Use the below one-liner from source (target directory) to your local backup location:
<smtcmp_block>
Tar and gzip all files in remote WordPress:
# Example: Backup site at /var/www/example.com,
# Send them to root@example.com, then compress.
scp -r * root@target-ip:/path/to/backup/
# Gzip the backup file after transfer (ensures data is compacted).
gzip -9 /var/temp/example.com.tar.gz
Replace variables as needed.
Step 2: Restore Backup to Your Local Linux Server
Assume you now possess:
? A database dump (db_backup.sql).
? Archive of WordPress files (site.tar.gz).
Step A: Restore Database
- Create a new MySQL/MariaDB instance.
# Replace "newbackup" and "rootpassword" with your settings.
# The line below runs the command for database creation:
creato databases;
# Grant all permissions to this user on that table.
GRANT PRIVILEGES ON database.*;
# Restore the backup from earlier steps.
# Replace username/password/database_name as needed.
myql> mysql -u root -prootpassword mydb < db_backup.sql
Check if data transferred successfully. If so, proceed to step 2 (below).
Step B: Extract and Deploy Site Files
- Uncompress the archive:
- Ensure your destination directory is correctly specified.
gzip -d /path/to/local/site.tar.gz tar -xvf site.tar -C /var/www/ ```tar
- Ensure your destination directory is correctly specified.
- Replace outdated WordPress configurations with this updated one.
Example Configuration for Testing
Adjust the below snippet within your local_wordpress.conf* file.
# Standard WordPress settings for testing on localhost:
define('DB_NAME', 'newbackup');
define('DB_USER', 'rootpassword');
define('DB_PASSWORD', 'proper_password');
define('DB_HOST', '127.0.0.1'); # Local server address.
define('DB_CHARSET', 'latin1');
# Adjust prefix as per your local environment.
$table_prefix = "migrate";
Update the values for DB_NAME, DB_USER, and DB_PASSWORD to match your database setup.
Manually Verify Restore Accuracy
After deploying files, validate data integrity using:
- For database validation:
Open MySQL command prompt and select your new database. Test SQL queries on critical tables (e.g., users, posts). - For file-system validation:
Switch terminal to your restore directory.# Compare the old backup site to the newly restored one: cd /var/www/my-site/ diff -rq oldbackup/ newbackup/This will highlight discrepancies between older and newer files.
Post-Restore: Finishing Touches
- Ensure your local copy of WordPress is fully operational in its new home.
- If using NGINX with Let’s Encrypt, configure DNS records to point there first, then manually verify SSL functionality.
Next Steps & Best Practices
Automation Tips for Faster Rollbacks
- Use cron jobs for scheduling weekly backups (e.g.,
gzip + rsyncapproach). - Leverage Vagrant for disposable test environments (simulate your hosting environment locally).
Security & Hygiene Considerations
- Always Encrypt Backups if stored off-site via passphrases.
- Maintain offline backups in air-gapped storage to prevent data corruption from malware or systemic failures.
Advanced Troubleshooting Guide
| Issue Category | Symptom Description | Root Cause Analysis & Resolution |
|---|---|---|
| MySQL Database Auth Fail | “Cannot find database.” in local WordPress dashboard. | Likely: Incorrect DB_NAME, DB_USER or DB_PASSWORD in local_wordpress.conf file. Solution: Open conf file via terminal, correct entries there and save. |
| Post-Restore Permalinks Broken (“404 Pages”) | All permalink pages return errors post-restore. | Likely: Outdated .htaccess file or missing rewrite_rules table in database. Resolution: |
- Re-save the settings in WordPress’ Permalinks Settings (save without changes first, then verify).
- Ensure database restore includes postmeta, termmeta tables.
|
|.tar.gz Backup Archive Corruption | “Missing files” post-extraction. | Likely: File was truncated during transfer. Solution: - Rerun backup without the gzip pass (reduce reliance on network stability).
- Verify original local copy’s integrity against source.
