Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

Make two Debian systems as identical as possible

If none of the specific sub-forums seem right for your thread, ask here.
Post Reply
Message
Author
drkirkby
Posts: 7
Joined: 2018-06-17 23:24

Make two Debian systems as identical as possible

#1 Post by drkirkby »

I have my companies website

https://www.kickbymicrowave.co.uk/

hosted in the UK on a VPS with Debian 9. The hosting has been generally quite reliable - so far this year, I have had only two outages of one minute each, based on monitoring results from a remote monitoring service. So an uptime of 99.998% so far this year. HOWEVER, last year there was a 14-hour outage, and I want to reduce the chances of another long outage by having a copy of the website on another server, so I can point the DNS servers at a new IP address in the event of problems.

How can I get the two installations as similar as possible? But that I mean each has exactly the same packages installed. I don't know how to list them. Anything related to Apache would be particularly important, such as any Apache plugins I might have installed on the first system.

Bulkley
Posts: 6387
Joined: 2006-02-11 18:35
Has thanked: 2 times
Been thanked: 39 times

Re: Make two Debian systems as identical as possible

#2 Post by Bulkley »

You probably want rsync.

Deb-fan
Posts: 1047
Joined: 2012-08-14 12:27
Been thanked: 4 times

Re: Make two Debian systems as identical as possible

#3 Post by Deb-fan »

^ Him ... what I was going to post but didn't prior. You're asking what could be a complicated question and think should be asking a search engine and doing your research. Rather than asking strangers on a nix forum. Not that there's anything wrong with soliciting pointers/tips I guess. My post is clearly another vote for rsync, think it's amazing and hats off to the people who develop such tools.

Only 2 cents on this deal. :)

Edit: Nah screw that, think this is spam, you got in a link to your website here and are touting this VPS host and their amazing 99.998% uptime. Ah whatever ...
Most powerful FREE tech-support tool on the planet * HERE. *

arzgi
Posts: 1197
Joined: 2008-02-21 17:03
Location: Finland
Been thanked: 32 times

Re: Make two Debian systems as identical as possible

#4 Post by arzgi »

I'd suggest

Code: Select all

# dpkg --get-selections

User avatar
Bloom
df -h | grep > 90TiB
df -h | grep > 90TiB
Posts: 505
Joined: 2017-11-11 12:23
Been thanked: 26 times

Re: Make two Debian systems as identical as possible

#5 Post by Bloom »

I use this to copy an installed system to another with different hardware. The target system must have the same Linux, minimally installed.

Code: Select all

rsync -avxHAXS --numeric-ids --info=progress2 --stats \
  --exclude={"/dev/*","/proc/*","/sys/*","/tmp/*","/run/*","/mnt/*","/media/*","/lost+found","/etc/udev/rules.d/*","/lib/modprobe.d/*"} \
  --exclude='/home/*/.local/share/Trash' \
  --exclude='/var/run/*' \
  --exclude='/var/lock/*' \
  --exclude='/lib/modules/*/volatile/.mounted' \
  --exclude='/var/cache/*' \
  --exclude='/home/*/.mozilla/firefox/*/Cache' \
  --exclude='/home/*/.cache' \
  --exclude='/home/*/.thumbnails' \
  --exclude=.cache --exclude Cache --exclude cache \
   "$1" "$2"
(Formatted for legibility). If it's for a server, you can exclude /home entirely.

User avatar
zarathustra-f90
Posts: 35
Joined: 2020-10-26 14:37
Has thanked: 19 times
Been thanked: 2 times
Contact:

Re: Make two Debian systems as identical as possible

#6 Post by zarathustra-f90 »

Maybe this post (http://forums.debian.net/viewtopic.php?f=10&t=148967) can give you a guide, it is about finding the installed packages by a user. That way you could install them in your new OS. Donno if this is exactly what you were looking for but I'm also interested in this idea, so if i find something more I'll come back with another answer :D

User avatar
sunrat
Administrator
Administrator
Posts: 6497
Joined: 2006-08-29 09:12
Location: Melbourne, Australia
Has thanked: 118 times
Been thanked: 476 times

Re: Make two Debian systems as identical as possible

#7 Post by sunrat »

zarathustra-f90 wrote:Maybe this post (http://forums.debian.net/viewtopic.php?f=10&t=148967) can give you a guide,
That thread has little relation to this topic.
“ computer users can be divided into 2 categories:
Those who have lost data
...and those who have not lost data YET ”
Remember to BACKUP!

Post Reply