How to take manual backup of Infix Project

  • /

23rd Jul, 2025

Infix Project & Database Manual Backup Guide (Linux)
✅ Prerequisites

Before starting, ensure you have:
- Terminal access to your Linux server (via SSH or direct login).
- Sufficient permissions to access Laravel project files and MySQL database.
- Basic understanding of Linux commands.


1. 📁 Backup Laravel Project Files Step 1: Navigate to the Laravel Project Directory

cd /path/to/your/infix-project

Example:
cd /var/www/html/infixedu

Step 2: Create a Compressed Backup (ZIP or TAR)

Option 1: Create a `.zip` archive

zip -r infix_project_backup_$(date +%F).zip . -x "vendor/*" "node_modules/*"

Option 2: Create a `.tar.gz` archive

tar --exclude='vendor' --exclude='node_modules' -czvf infix_project_backup_$(date +%F).tar.gz .

💡 Excluding `vendor/` and `node_modules/` can reduce backup size. You can reinstall them later using `composer install` and `npm install`.


2. 🛢️ Backup the MySQL Database Step 1: Run the `mysqldump` Command

mysqldump -u DB_USERNAME -p DB_NAME > db_backup_$(date +%F).sql

Replace:
- DB_USERNAME → Your database username
- DB_NAME → Your Laravel project’s database name

Example:
mysqldump -u root -p infix_db > db_backup_$(date +%F).sql

After running the command, you’ll be prompted to enter the database password.


3. 📦 Store or Download the Backups

You now have:
- infix_project_backup_YYYY-MM-DD.tar.gz or .zip
- db_backup_YYYY-MM-DD.sql

To Move Backups to Another Directory:

mkdir -p ~/backups/my-infix-app
mv infix_project_backup_*.tar.gz db_backup_*.sql ~/backups/my-infix-app/

To Download Backups via SFTP (Optional)

scp user@your-server:/path/to/backup/*.tar.gz /local/path/
scp user@your-server:/path/to/backup/*.sql /local/path/


🧪 (Optional) Test Your Backup

To ensure the integrity of your backup:

- Extract the project archive: `tar -xvzf filename.tar.gz`

- Open the `.sql` file in a text editor to verify it contains SQL data.


🗒️ Notes

- Consider automating this process using a shell script or cron job for regular backups.
- Always store backups in a secure location.
- Double-check file permissions if any issues arise during compression or transfer.