Backing up WS.WebTV
support, ws.webtv, home, maintenance, backup
WS.WebTV can be backed up manually or using the built-in Backup functionality included in recent versions. Bellow you'll find details about both procedures.
WS.WebTV, since version 3.0.5, includes a backup functionality. It allows backing up all the files in the WebTV installation folder as well as the Database. The Backup feature allows creating backup projects any time as well as automatic backups.
Because this feature allows downloading the whole Site, it is necessary to expressly enable it.
- For new WebTVs: During the installation procedure you will be presented with an option to enabled/disable this functionality.
- For WebTVs already installed: You must enable it from the configuration file (config/Config.inc.php), by adding the following variable:
$BACKUP_FUNCTIONALITY_ENABLED = true;
- For the Auto-Backup option (if enabled), you must create (in case you don't already have one...) a "cron job" in your server so that it "visits" the script <webtv_url>/cron.php, at least once a day. The cron must be created using a lynx, wget or curl command, although many server control panels may only require entering the URL without any command.
- This functionality can only be used by the "Super User" (account with ID = 1).
- The backup functionality will send notification E-Mails to the "Super User" every time a backup project is finished (the message won't be sent to the notification E-Mail).
Once Backup is enabled, log into the Content Administrator using the "Super User" credentials, then configure the Backup options (Storage, Auto-Backup, etc.) from Configuration > Backup. Once it is configured, access the Backup feature from the Content Administrator Home screen or from the top menu. In the Backup section you will find existing backup projects and you can also create new ones on demand.
DATABASE BACKUP/DUMP LOCATION
When the backup project includes the Database please keep in mind that the resulting .sql files will be located in the uploads/_backups/PROJECT_NAME/ folder of the ZIP file.
COMPLETE RESTORE PROCEDURE
NOTE: Always keep the ZIP file after restoring!
1 - File restore procedure:
- Unzip the archive and copy all files and folders to the server.
- Create the folder temp/cache (if it does not exist) and assign write permissions.
- If, for whatever reason, the DB connection details changed then update the config/Config.inc.php file accordingly.
2 - DB restore procedure:
2A - Case of full DB dump (db_full_dump---structure_data_constraints.sql) - recommended!
This file will exist if "mysqldump" was available during the backup process.
- Make sure that the target Database is empty.
- Import the file uploads/_backups/PROJECT_NAME/db_full_dump---structure_data_constraints.sql using a Database management utility like phpMyAdmin.
2B - Case of partial DB dump (db_structure.sql, db_data.sql and db_constraints.sql)
These 3 files are always generated and can be used when the full dump is not available.
- Make sure that the target Database is empty.
- Import the following 3 files (in this same order!) using a Database management utility like phpMyAdmin:
- uploads/_backups/PROJECT_NAME/db_structure.sql
- uploads/_backups/PROJECT_NAME/db_data.sql
- uploads/_backups/PROJECT_NAME/db_constraints.sql
3 - At this point the WebTV should be working fine...
4 - Log into the Content Administrator using the "Super User" credentials and:
- Check folder permissions by running the Diagnostics tool.
- Delete the current "pending" Backup project (which is the backup project that created the backup you have just restored...) - this will also delete the backup project folder from the uploads/_backups/ folder.
Although this functionality has been tested on Windows and Linux environments, and we haven't found any issues (we have been able to successfully restore the WebTV in either case), it is advisable to verify the archive files. In order to verify archive files, extract random files form the archive and make sure they are OK (for example, images and/or videos); additionally, extract the database backup and try to import it into an empty Database of your server (there should not be any errors).
This is the manual bakup procedure which requires FTP access as well as access to a Database management tool like phpMyAdmin or mysqldump.
It is very important that you keep a recent backup of your WebTV's database. You can backup the WebTV´s database by using the "Export" option of phpMyAdmin. Most Web hosting providers allow the access to phpMyAdmin from their control panels.
Backing up the WebTV Database
from phpMyAdmin
1. Select the WebTV Database, at the left.
2. The
tables of the Database will appear at the right...
3. Click the Export tab.
4. In the Export tab, check the options highligthed in the following image:
After clicking on "Go" the .sql file will be generated and downloaded.
Use a FTP program to download all files and folders of the WebTV into your PC.
Important files and folders
Although you will always be able to download the WS.WebTV files from our Website, it is very important to keep a recent copy of the following files and folders (besides the database, of course...):
/config/Config.inc.php (don't confuse with Config.php)
/config/geo_block_ip_map.js
/config/geo_block_ip_whitelist.js
/config/license.lic
/config/random_name.pek (a file with .pek extension)
/temp/logs/*.*
/uploads/*.*
/apple-touch-icon.png
/apple-touch-icon-precomposed.png
/favicon.ico
/robots.txt
/sitelock.xml
Other files
In case you have modified files like image files, CSS files, templates, or language files, we recommend you to back them up and keep a record of the modifications; that way, if you need to reinstall or update your WebTV, you will always be able to re-apply the modifications.