0

I have a Joomla website and I recently discovered that there are a number of malicious files on different directories. I have a backup and want to setup a new Joomla site and use the previous website data from the backup database.

I checked the database and found that the content and category tables use the assets table. But do not know if there are other related tables or so. I checked the assets table and could not understand the use of lft and rgt columns.

I want to write a PHP script to copy content data from the old backup and write to a new Joomla site.

I am not that familiar with the Joomla db structure. If anyone can guide me to understand the table relations or refer me to a doc that would be a great help.

nasirkhan
  • 9,948
  • 5
  • 27
  • 33
  • Why don't you just restore the whole SQL backup to a new DB server? – ADyson Aug 22 '23 at 09:32
  • I'm not familiar with Joomla but in case you need to make a complex data migration I wrote a [data migration framework](https://github.com/AymDev/Fregata) (with its [Symfony bundle](https://github.com/AymDev/FregataBundle)) if that helps. – AymDev Aug 22 '23 at 09:37
  • @ADyson the backup is older. J4 structure is different than the one I have. So I am planning to create a new J4 site and use the previous content. – nasirkhan Aug 22 '23 at 09:54
  • Wouldn't it be simpler to restore what you have, (hopefully without the malicious bits) and then do an upgrade? I'm also not famliar with Joomla but maybe it has an upgrade path? P.S. `the backup is older`...you should take more frequent backups, then! – ADyson Aug 22 '23 at 09:56
  • thanks, I know I should take more frequent backups. Backup was provided by the site owner and they are not sure if that is also affected or not. You may suggest me to buy migration extensions as a solution. but I want to follow the db to db transfer way. – nasirkhan Aug 22 '23 at 10:03

0 Answers0