Moving Sandstorm install to different server

380 views
Skip to first unread message

wakos...@gmail.com

unread,
Sep 3, 2014, 8:27:07 PM9/3/14
to sandst...@googlegroups.com
Howdy?

I would like to use Sandstorm for a project I'm working on and I have questions on moving Sandstorm installs across servers, possibly different OS.

First, I read on Github that Sandstorm currently will not install in a Docker container, https://github.com/sandstorm-io/sandstorm, is this still the case?
What's the easiest way to copy a Sandstorm install to a different server at the moment and what features are in the pipeline for easy migration?

I'm hoping to get started on a small server then move to a bigger hosted server.

Regards.

Kenton Varda

unread,
Sep 4, 2014, 3:12:49 PM9/4/14
to wakos...@gmail.com, sandst...@googlegroups.com
Hi,

Actually, Sandstorm can now run in Docker, as long as you aren't using it for app development. I've updated the readme to reflect this.

There are two easy ways to transfer Sandstorm data to a new server:

1) You can use the backup/restore functionality to transfer individual app instances. Just click the "download" icon in the top bar to get a zip containing all of the app's data. Then, click the "Restore a backup" button on your destination server to upload the zip there. This is the cleanest way to move data, but may be tedious if you have a lot of apps. We plan to add bulk backup/restore and direct transfer features in the future.

2) To move the entire server state to a new machine, just transfer /opt/sandstorm/var to the new server, then install Sandstorm again on top of it. If the "var" directory already exists, Sandstorm will just use it. Note that you will have to update your OAuth configuration with Google and/or Github to match the new hostname, otherwise login will not work.

-Kenton



--
You received this message because you are subscribed to the Google Groups "Sandstorm Development" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sandstorm-de...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

ura...@gmail.com

unread,
Apr 11, 2018, 4:40:43 AM4/11/18
to Sandstorm Development
Hi Kenton, when I copy /opt/sandstorm/var to the new machine then install a new instance of sandstorm, it stops with "You seem to already have a /opt/sandstorm directory with a Sandstorm installation inside.".

If I install a new instance then overwrite var directory, the new server still needs setup, i.e. it's not a copy of the original server.

This thread is old, can you give an advise about current way to move the whole server to a different machine?

Thank you very much.

Kenton Varda於 2014年9月5日星期五 UTC+8上午3時12分49秒寫道:

Jacob Weisz

unread,
Apr 11, 2018, 10:06:45 AM4/11/18
to sandst...@googlegroups.com
The backup/restore a whole server instructions are the current standing recommendations for it: https://docs.sandstorm.io/en/latest/administering/backups/

--
Jacob Weisz
goo...@jacobweisz.com
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/sandstorm-dev/94079f42-7dc1-4fda-9cd2-1a790ee5652b%40googlegroups.com.

Romulus Urakagi Ts'ai 仲明

unread,
Apr 11, 2018, 10:10:12 PM4/11/18
to Jacob Weisz, Sandstorm Development
Hi Jacob, I have tried that, then have this error in sandstorm.log:

** Starting Sandstorm at: Thu Apr 12 10:07:33 2018
** Starting back-end...
** Starting MongoDB...
note: noprealloc may hurt performance in many applications
about to fork child process, waiting until server is ready for connections.
forked process: 8
ERROR: child process failed, exited with error number 1
*** Uncaught exception ***
sandstorm/run-bundle.c++:2352: failed: **mongod failed to start. Initial exit code: ; status = 1; bailing out now. For troubleshooting, read /opt/sandstorm/var/log/mongo.log (or var/log/mongo.log within your Sandstorm if installed to a different place) and visit: https://docs.sandstorm.io/en/latest/search.html?q=mongod+failed+to+start
stack: 0x48c4c8 0x487f5f 0x483cff 0x482fdc 0x5dc421 0x5ddccb
** Server monitor died. Aborting.

Do you have any idea? Thanks.

--
You received this message because you are subscribed to a topic in the Google Groups "Sandstorm Development" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/sandstorm-dev/EwSPX-UveP4/unsubscribe.
To unsubscribe from this group and all its topics, send an email to sandstorm-dev+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/sandstorm-dev/1523455602.2375609.1334355456.055ABD61%40webmail.messagingengine.com.

For more options, visit https://groups.google.com/d/optout.



--
Romulus Urakagi Ts'ai

Jacob Weisz

unread,
Apr 11, 2018, 10:33:04 PM4/11/18
to Romulus Urakagi Ts'ai 仲明, Jacob Weisz, Sandstorm Development

Check that mongo.log file, it's gotta give a bit more info.

 

Sent from my Windows 10 phone


> To view this discussion on the web visit
> https://groups.google.com/d/msgid/sandstorm-dev/94079f42-7dc1-4fda-9cd2-1a790ee5652b%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to a topic in the Google Groups "Sandstorm Development" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/sandstorm-dev/EwSPX-UveP4/unsubscribe.

To unsubscribe from this group and all its topics, send an email to sandstorm-de...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.



 

--

Romulus Urakagi Ts'ai

 

Romulus Urakagi Ts'ai 仲明

unread,
Apr 11, 2018, 11:23:37 PM4/11/18
to Jacob Weisz, Jacob Weisz, Sandstorm Development
It does not have any new log message. If I clear the log files and do again, the mongo.log file is not created.


> To view this discussion on the web visit
> https://groups.google.com/d/msgid/sandstorm-dev/94079f42-7dc1-4fda-9cd2-1a790ee5652b%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to a topic in the Google Groups "Sandstorm Development" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/sandstorm-dev/EwSPX-UveP4/unsubscribe.

To unsubscribe from this group and all its topics, send an email to sandstorm-dev+unsubscribe@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.



 

--

Romulus Urakagi Ts'ai

 

Kenton Varda

unread,
Apr 15, 2018, 8:23:57 PM4/15/18
to Romulus Urakagi Ts'ai 仲明, Jacob Weisz, Jacob Weisz, Sandstorm Development
Hi Romulus,

Please make sure that all of the files you have transferred have exactly the same permissions as they did originally. They need to be owned by the same user and group as they were originally, and must have the same attribute bits (read/write/execute for user/group/other). My guess is that Mongo is failing to start because /opt/sandstorm/var/mongo is not writable to the Sandstorm server user.

To transfer files while preserving permissions, you should use `cp -a` or `tar` (as root) to perform the transfer. Note that `cp -r` -- or running `tar` as non-root -- will not preserve ownership.

-Kenton

Romulus Urakagi Ts'ai 仲明

unread,
Apr 15, 2018, 9:03:02 PM4/15/18
to Kenton Varda, Jacob Weisz, Jacob Weisz, Sandstorm Development
I had not tar with root. Is the user and group OK with just the same name (over same uid or gid)?
Thank you!

Kenton Varda

unread,
Apr 15, 2018, 9:39:00 PM4/15/18
to Romulus Urakagi Ts'ai 仲明, Jacob Weisz, Jacob Weisz, Sandstorm Development
Yes, same name is fine.

Specifically some things are owned by root and some things are owned by the "sandstorm" user. The "sandstorm" user might have a different UID on the new machine, that's fine.

-Kenton

Romulus Urakagi Ts'ai 仲明

unread,
Apr 16, 2018, 10:19:56 PM4/16/18
to Kenton Varda, Jacob Weisz, Jacob Weisz, Sandstorm Development
It worked, thank you.

Romulus Urakagi Ts'ai 仲明

unread,
May 7, 2018, 12:37:17 AM5/7/18
to Kenton Varda, Jacob Weisz, Jacob Weisz, Sandstorm Development
One thing, the rocket.chat app will be broken if you pack grains while sandstorm is running. The database will not work. 
So be sure to stop sandstorm before you pack the whole things is a better idea, obviously. 

It worked, thank you.


> To view this discussion on the web visit
> https://groups.google.com/d/msgid/sandstorm-dev/94079f42-7dc1-4fda-9cd2-1a790ee5652b%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to a topic in the Google Groups "Sandstorm Development" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/sandstorm-dev/EwSPX-UveP4/unsubscribe.

To unsubscribe from this group and all its topics, send an email to sandstorm-de...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.



 

--

Romulus Urakagi Ts'ai

 




--
Romulus Urakagi Ts'ai

--
You received this message because you are subscribed to the Google Groups "Sandstorm Development" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sandstorm-de...@googlegroups.com.



--
Romulus Urakagi Ts'ai

--
You received this message because you are subscribed to the Google Groups "Sandstorm Development" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sandstorm-de...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages