Moosh

Moosh

by Jamie Tinley -
Number of replies: 4
1. Is it possible to either not backup certain items with Moosh or only restore certain items?  I do not want the users, blocks, calendar, etc. I only want activities and resources AND I specifically want to exclude BlackBoard Ultra links from activities because I'm upgrading to a new moodle and it uses a different version which could confuse my teachers who might try to use it. 

2. Can moosh rename the shortname fullname of the course I restore?

3. Also, is there a way to copy these files from one Virtual Ubuntu box to another Virtual box on Hyper V?

Thanks in advance.

Average of ratings: -
In reply to Jamie Tinley

Re: Moosh

by Ken Task -
Picture of Particularly helpful Moodlers

Hmmmm .... a 'laundry list' .... oh, well .... here goes off top of head:

1. Is it possible to either not backup certain items with Moosh or only restore certain items? ... exclude BlackBoard Ultra links

Think moosh uses backup defaults in Moodle ... so set the backup defauslts to include/exclude what you can.
See: https://moosh-online.com/commands/
course-backup

Might have to restore the entire course but moosh does have a commands you might have
to run through to end up where you want.

module-manage

See above link.

"2. Can moosh rename the shortname fullname of the course I restore?"

See link above: course-restore, course-create, course-connfig-set

3. there a way to copy these files from one Virtual Ubuntu box to another Virtual box on Hyper V

push or pull is possible.

'push' .... From the VUB box, scp the the backups to the HyperV Ubuntu to a file system repository.

'pull'
OR create teh VUB backups to save to a web accessible directory (outside of Moodle)
and in the HVVG instanace, use wget to 'pull' into the file system repo on the HyperV instancew.

in the VBU once you have saved the backups to a web accessible directory,
/var/www/html/cbackups/

go into
that directory and issue: ls -1 > courselist.txt
That will list just the backup filenames that are conteined in the web accessible
directory.

HPV instance install wget.  HPV instance has a file sytewm repo called 'backups' in moodledata/repository/
cd backups
and in there wget http://oldsite/cbackups/couselist.txt
Edit courselist file and place before each backup file name, the
url you used to get the cuorselist.txt file.
Each line will look like:
http://oldsite/cbackups/[nameof1backup.mbzfile].

Then issue:
wget -i courselist.txt

Clean up old site when xferrs are done.

'spirit of sharing', Ken

PS ... when you work it out, share back what you did! smile


In reply to Ken Task

Re: Moosh

by Jamie Tinley -

Hi Ken,

you know I've been reading you all week every time I google Moosh.  I have decided that you are Moodle, well, you are Martin, as you are everywhere!

I've been to that link and sadly restore is very basic for course-restore. They have 13 entries of restore but the others are for restoring settings.  Ah, I see just doing a 2nd command config-set works for me. cool. But my default backup settings does not seem to have a way to remove those Ultra links. I'll have to train them on that. 

Thanks for the advice as ever, I'll share back when I decide which way to share my files to my other ubuntu box.


In reply to Jamie Tinley

Re: Moosh

by Ken Task -
Picture of Particularly helpful Moodlers

Apologize not taking last response through spell check/typo check ... but was kinda rushed once I began the response (got fat fingers too which doesn't help! sad).

Thanks for compliment, but am in no way near Martin .... just a user who has gotten off into some rather strange 'projects'. 

Matter of fact, Xferred 4000+ courses from a putzed UB 14.04 under HyperV to a fresh UB 16.04 under HyperV.   The instances were actually on the same physical HyperV.   Too bad HyperV didn't have something like a 'shared folder' in Virtualbox ... would have been a little easier.  Not only xferred the courses but also restored them via moosh to the same categories they had on old box.   Took 1.5 days.

The backup.php script in admin/cli/ takes preferences from backup settings - thus moosh does also.  Yes, it would be nice to have some more options in backup settings, but we have to remember the 'one size fits all' code has to appeal to sooooooo many.  Too many options leads to confusion also. :\

'spirit of sharing', Ken



In reply to Ken Task

Re: Moosh

by Jamie Tinley -

Hi Ken, 

I think you'll like the solution below.  I of went down the wrong road trying to to connect by installing samba, nitroshare, libpam-smbpass, teamviewer, etc and finally gave up and asked my younger but very busy boss at work. Took me 2 years to appreciate that like you he is way smarter than me even though he is 15 years younger.  He works better the busier he is because his brain goes on overdrive to solve things fast so he can get back to business. I hate bothering him and you but eventually I cry uncle. He first tried to continue my samba method I had invested so much time into but after he finally got them talking (10 min) then I asked why cp does not work for me and he said I have to use samba's commands to copy - which he realized would be forever for me so he scrapped my project and took about 5 min for a more elegant solution I'm still trying to understand. I'm typing all the steps both he and I took to help anyone else out who comes this way.  Some of the steps maybe were not needed so my apologies.

Bottomline command that worked: 

Scp /home/mdladmin/Public/BackupsJT/CourseBackups/001backup.bmz mdladmin@10.62.10.27:/Public

Installation details Connecting two ubuntu virtual servers on a Hyper V platform ( commands in bold)

U1: ubuntu old server hostname moodle runs 14.04 with gui  at 10.62.10.27

U1 shared file path to mbz backups is:  //home/mdladmin/Public/BackupsJT/CourseBackups 

U2 ubuntu new server hostname: moodleu2  runs 16.04 without gui

U2 shared path /home/Public

ping moodle  on U2 to U1 name.  and saw that it returned 127.0.1.1  To him that meant it was pinging itself. He realized I had in creating my NS I had re-used an even old hyper-v virtual windows server called moodle and despite my new hostname being moodleu2 it thought of itself as moodle like my U1. BTW, for those of you wondering if it is worth the learning curve to move from windows to ubuntu I would say YES, thanks Ken!

ifconfig to see the ip address of each server above

chmod 0777 /home/mdladmin/Public  on both U1 and U2

got insight here when he saw this line:  scp /path/to/file username@a:/path/to/destination

Sudo ufw status on new U2

Sudo ufw allow 21/udp on new U2

Sudo ufw allow 21/tcp on new U2

Sudo ufw allow 22/udp on new U2

Sudo ufw allow 22/tcp on new U2

ps not sure what processes he wanted to check here

Apt-get install ssh on U2, was already installed on U1

Sudo ufw status (showed both 21 and 22 both had tcp and udp)

Scp /home/mdladmin/Public/BackupsJT/CourseBackups/001backup.bmz mdladmin@10.62.10.27:/Public

I hope this helps someone smile