Moodle 3.3.2+ Backup with cronjob which folder? - moodle

I success installing moodle 3.3.2+ in my VPS. I want to backup those moodle but not knowing which folders should i backup every day...
it is i think not wise to backup all folder in moodle instalation since it would be has very big size..
so could anyone suggest which folder is essential that got updated dynamically and should be include in my backup plan.
thanks in advance

Moodle stores uploaded content in a moodledata folder. To check the path to that folder, take a look in config.php file in the root Moodle directory and search for $CFG->dataroot. This folder as well as the database should go in the backup. The Moodle code itself (unless you have custom changes you want to keep) can be obtained from moodle.org if it is necessary.
See the Moodle docs for more info: https://docs.moodle.org/33/en/Site_backup

Related

How do I browse all the files uploaded to Moodle

Moodle stores references to all files uploaded to it in its database, the files themselves get hashed and stored on disk but you cannot work out what the files are by looking at them on the disk.
Is there somewhere in the Moodle interface that lets you browse all the files that have been uploaded as an admin?
Is this available as a plugin? Looking for some kind of global file store browser.

Transferring MongoDB data

So, as the documentation says, by default, it stores data in the data/db/ directory. As I can see through the file manager, the folder is empty. I guess the documents are hidden there.
So, If I pull a repository with this folder from another PC, will I be able to access this data through MongoDB?
I guess the documents are hidden there
Unlikely. I'm betting that your data dir is set to another value.
If I pull a repository with this folder from another PC
This may work, but, at best, it'll overwrite your local data files. At worst, it'll overwrite your local data files and mongodb won't boot with your new data files.
A recommended/supported way is to use mongodump/mongorestore. Bonus point: you won't have to care about where your data files are on both computers.
If you have installed MongoDB for example from Debian/Ubuntu package the data directory will be /var/lib/mongodb.
See https://askubuntu.com/questions/982673/where-is-mongo-database-folder-on-the-filesystem

Copying original *viewdefs.php into custom folder? suiteCRM / sugarCRM CE

I saw someone "extending" an existing viewdef by simply copying the stock file into the custom folder and then modifying that copied file.
It makes sense, but I don't see that in official documentation.
Example modules/Leads/metadata/editviewdefs.php copied to custom/modules/Leads/metadata/editviewdefs.php
Is this safe/correct way of doing it?
That's the correct way to do it.
A quick reminder about future SuiteCRM upgrades and view/edit-defs.
Sometimes newer SuiteCRM versions add/edit fields to modules and the upgrade process will not upgrade your copy of those files, sometimes causing weird errors.
If you have access to a Backup is more easy to copy the file from there and then edit it with a new Uploader Package.

How do I unstage a Moodle update

After logging in to my Moodle as admin, I clicked the link to update to the latest available Moodle version. However, the new version won't work with my hosting site's MySQL version. Simple enough, I just selected the cancel button. Nope. The cancel button does nothing. Additionally, whenever I log in as admin, I am redirected to the update confirmation page where I can't actually perform the update or cancel the action. The web hosting service restored a previous version from backup, but the very next time I logged in as admin I was right back at the same update page.
Is there any way to unstage/delete/remove the "I want to update my Moodle" flag/action/request/whatever from the Moodle database/data files?
Thank you for your help!
When you download the new version of Moodle, it overwrites the existing files. You need to move all your files from the Moodle code directory (NOT your Moodle data directory) into another directory, then download a clean copy of your previous version of Moodle (from Moodle.org) and place it in your original directory.
Once that is done, you will need to copy across your config.php file, along with any extra plugins you had installed.
After that, you should be able to log back into your site and it should be back to running as normal again.
Before you do any future upgrades, there is a compatibility check built into Moodle itself (I think it is somewhere under site admin > server, but I don't have a site open at the moment to check). It is worth looking at that before downloading the upgrade.

Web2py transfer site

I have a Web2py site that I want to transfer to another computer. I'll do an SQL dump for the (external) database, but does anyone have experience of transferring the Web2py site itself? Which files do I need to copy to the new machine?
Thanks everyone.
You should be fine just copying the application folder. You can exclude the /cache, /errors, and /sessions subfolders. Make sure you restore the database before running the application (or if you want web2py to re-create the database tables, make sure migrations are enabled and do not copy the contents of the /databases folder).