Jason Stelzer on 20 Apr 2010 07:55:22 -0700


[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

Re: [PLUG] BEST way to move all contents from one server to another


I generally just import things in /etc into git repositories and leave
things pretty much sit as is. In other words, I keep /etc/wordpress is
in a git repo, /etc/squid3 is in a git repo, /etc/apache2  and so on.
I considered versioning all of /etc in one big config file, but
there's a lot of stuff in there I never muck with. Versioning
important configuration files is just good practice IMO.

The only thing to keep in mind is that if you have stuff symlinked to
/data and /data is not on your boot partition, then I imagine you may
have a potential race condition between when the system starts to come
up and all the mount points are mounted. That said, I can't think of a
concrete example, so I could just being paranoid and hand wavy.

Ok, here's a contrived example. If you have a shell you like to use
under /data instead of in /bin and you change root's shell to it, then
drop right to a root shell via init=/some/path.... it will not work
right. So don't do that.

As far as the original thread, I made strategic use of rsync + ssh as
well last time I moved servers around. As long as you do a good job
keeping your 'custom' data sand boxed away from the 'system' or
'package' data, it is super easy. For me it wound up being essentially
/home and some custom paths under /var.

On Tue, Apr 20, 2010 at 10:39 AM, Douglas Muth <doug.muth@gmail.com> wrote:
> On Tue, Apr 20, 2010 at 10:27 AM, Tim Allen <flipper@peregrinesalon.com> wrote:
>> All contents? You have to be careful there (probably don't want to try
>> moving /sbin, /root, or /bin, for instance), but I think what you're
>> looking for is rsync:
>>
>
> I agree, rsync is probably the best tool for the job, especially since
> it will let you resume an aborted transfer, transfer files that have
> had their contents updated since the last transfer, etc.
>
> On a related topic, something I've started doing whenever I set up a
> server is to create a directory called /data, and place all of my
> files in there. If I have a config file hanging in out in /etc/ that I
> can't move, I'll instead symlink it to a copy in /data/etc/ or (next
> best) create an RCS directory in /data/etc/RCS/, and symlink /etc/RCS/
> to that directory.  That makes backups simple, since I only have one
> directory to back up. (I ensure that MySQL dumps are written to
> /data/mysql-backups/)
>
> Does anyone else take that approach for server/file management, or is
> it just me? :-)
>
> -- Doug
> http://twitter.com/dmuth
> ___________________________________________________________________________
> Philadelphia Linux Users Group         --        http://www.phillylinux.org
> Announcements - http://lists.phillylinux.org/mailman/listinfo/plug-announce
> General Discussion  --   http://lists.phillylinux.org/mailman/listinfo/plug
>



-- 
J.
___________________________________________________________________________
Philadelphia Linux Users Group         --        http://www.phillylinux.org
Announcements - http://lists.phillylinux.org/mailman/listinfo/plug-announce
General Discussion  --   http://lists.phillylinux.org/mailman/listinfo/plug