Quantcast
Channel: Backup and restore
Viewing all articles
Browse latest Browse all 6648

Re: Programmatic backup and restore

$
0
0
by Perry Way.  

Looks like backup files are made without error but the backup files themselves are not working when it comes to restore because some activities that I set to not be backed up are being attempted to be recreated on the restore. This puzzled me so I have been trying to identify the cause of that and found that there's a reference to the missing items in the file named moodle_backup.xml in the root folder of the backup folder.


The same identical kind of setup on a backup when done interactively results in a useful file that restores properly. So there's something else going on besides merely setting the visibility of the items as they are queued up for backup.


Anyone have a clue what I'm missing? There's a lot of code implemented in many classes, and likely I am missing something perhaps not so obvious is what I'm thinking.


here's a code example of what happens when an item that is not to be included in the backup...

                    if (!$visible)
                    {
                        echo "\titemid " . $itemid . " is not visible and will be eliminated from backups\r\n";
                        $setting->set_visibility(base_setting::HIDDEN);
                        $setting->set_value(0);
                    }


When I set the visibility to hidden and the value to 0 this module or section will not be outputted in the various xml files, but again it is referenced in what looks like a generic synopsis kind of settings file that restore uses to find out what to restore I guess.


Viewing all articles
Browse latest Browse all 6648

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>