Import production data into Vagrant for mail testing

(Paul Apostolos) #1

I am trying to import a backup into the Vagrant image so I can do some testing with our production data .

Can this be done? I keep getting an error about not enough space (the backup file is 5.2 MB)

(Jeff Atwood) #2

Personally, I would set up a Discourse instance on Digital Ocean following our install guide and test there.

(Paul Apostolos) #3

I have that…But as this specific test involves email sending, I am rather gun shy about using it.

I know the Vagrant image allows me to use mailcatcher and that would be very useful here.

(Régis Hanol) #4

If this is for testing, you could change the has_enough_space_on_disk? method of the backups_controller

(Paul Apostolos) #5

That worked…Thanks!

(Kane York) #6

I just ran into this same problem. I think it’s because VirtualBox has dynamically expanding disks.

(Paul Apostolos) #7

@riking I also had to delete the lock_timeout line at the top of the dump.sql file…See this post

(Kane York) #8

Hm, I just dragged my backup file into /home/kane/projects/discourse/public/backups/default/ and it showed up. The restore worked, by the way.

(Paul Apostolos) #9

That’s a good tip…I jumped through hoops, but I could have just back-doored it :smile:

Next time, I’ll take the simpler approach.