Ability to exclude DB data from backup, but include DB Settings (SKINS)

Version 1.41


New option for backups allowing Admin Backup/Transfer and User Site Backup to chose if they want the database data included in the backup. The old option "Databases" is renamed "Database Settings". All variable names remain the same for this checkbox. New option called "Database Data" specifies the inclusion of the actual sql data. DB Settings includes Users, passwords, access hosts, etc.. The "DB Data" is the sql data. If the DB Data is selected, the DB Settings *must* be selected (javascript is used to enforce this) The settings can be selected, and the data not selected, giving the backup the skeleton of the database setup, without any tables or data. This is useful if you need to transfer a User account to a different server with a large database, and need to transfer the sql data manually (bypassing the DA backup system) During the update, the old dataskq command: action=convert&value=cronbackups is run to update the: /usr/local/directadmin/data/admin/backup_crons.list to add: database_data_aware=yes to each cron.. and if the option10=database was present, DA will add option11=database_data. The database_data_aware option is needed to ensure that when the update is run a 2nd time, if the database_data is missing, it stays missing, as it would be the desired state at that point. Backup files also change slightly. The file: backup/backup_options.list will also have a new option: database_data_aware if created by this version of DA. It's needed to tell DA if the backup was created before or after this feature was added. If database_data_aware does not exist in the backup_options.list, then if database exists, database_data is added internally. If database_data_aware does exist, and backup, and database exist, but database_data does not, then the sql files will not be restored. The user_db.conf files will be restored. ------------------------------------- SkINS: admin/admin_backup.html admin/admin_backup_modify.html user/site_backup.html user/site_restore.html The forms to create a backup need the following added: <input type=hidden name="form_version" value="2"> as well as: <input type=checkbox name=option11 value="database_data" |DATABASEDATAON| onClick='setSelectedData(); if (this.checked == true) { document.tableform1.option10.checked = true; }'> A change is needed for the existing "database" checkbox: <input type=checkbox name=option10 value="database" checked onClick='setSelectedData(); document.tableform1.option11.checked = this.checked;'> The form_version=2 tells DA that these options exist in the form. Without form_version=2, DA will assume the skin is old, and if "database" is passed, then database_data is internally turned on.

Interested to try DirectAdmin? Get a 30-day Free Trial!