Simple Back Up & Restore Method

Jaidee

Member
DaDaBIK version 11.9-Elba enterprise, installed on 06-28-2023
PHP Version: 7.4.33
mysql version: 8.0.31
Web server: Apache/2.4.54 (Win64) PHP/7.4.33

How do I back Up ? and Restore my Dadabik generated app ?
I have to respond to this question before I can put any dadabik app in production ?

I have a development system.(my PC)
I have a production system.
1. How do I simply port my dadbik app from development to production system.
All CODE + All CONTENT !
and reverse
2. From production system to development system (data only) CONTENT ONLY
 

deep64blue

DaDaBIK Guru
1. How do I simply port my dadbik app from development to production system.
All CODE + All CONTENT !
and reverse
2. From production system to development system (data only) CONTENT ONLY
1 is the easy bit:-
  1. export your db
    • mysqldump -u [user name] -p[password] [database name] > [dump file] on the linux command line or via phpymyadmim
  2. back up your files
  3. copy your files to production
  4. restore your db to production database
    • mysql -p -u[user] [database] < db_backup.dump or via phpymyadmin
For 2 I have my dadabik tables using the prefix zdadabik and make sure no other tables start with z, I export my production db into groups of files based on the names of the tables*:-

mysql -p -u [database] -N -e 'show tables like "z\_%"' | xargs mysqldump [database] --add-drop-table -u -p > dadabik.sql
mysql -p -u [database] -N -e 'show tables like "a\_%"' | xargs mysqldump [database] --add-drop-table -u -p > data-a.sql
mysql -p -u [database] -N -e 'show tables like "b\_%"' | xargs mysqldump [database] --add-drop-table -u -p > data-b.sql

etc etc

This will give a dadabik.sql file you DO NOT want to restore to dev and a bunch of data sql files you do.

* If I was starting a fresh project I would probably choose one prefix for data tables!

Hope this helps!
 

Jaidee

Member
Thank you :) OK
I can back up and restore specific mysql I created for dadbik. No problem.
But how do I copy restore the dadabik settings/functions etc ?
Can't I copy complete installed entire databik + specific mysql ?
or I just simply
backup and restore/include folders and subfolders + my specific mysql file ?
 

deep64blue

DaDaBIK Guru
But how do I copy restore the dadabik settings/functions etc ?
Can't I copy complete installed entire databik + specific mysql ?
or I just simply
backup and restore/include folders and subfolders + my specific mysql file ?
You should copy the entire dadabik installation not just /include.
 
Top