Success! How-to: Moving from one machine to another with v5 pip and rsync

64 views
Skip to first unread message

Chris Alemany

unread,
Aug 26, 2023, 1:07:54 AM8/26/23
to weewx...@googlegroups.com
Hi all.

I take up plenty of bandwidth with questions and things so I thought I’d share a success in case it helps others.
Last night I upgraded an old iMac and installed Debian 11 on it.
Today I moved my newly installed v5b10 pip venv over using rsync from a RPi (Debian) onto the iMac with just a few commands so I thought I’d share:

— All operations are on the destination (iMac) unless specified —

1) create a new user with same name and home path as old (eg. /home/weewx)

2) login to the new user and follow the v5 pip install method but *only* this steps. (I only tested this on Debian)
i) sudo apt update
ii) sudo apt install python3-pip -y
iii) sudo apt install python3-venv -y
iv) python3 -m venv ~/weewx-venv
v) source ~/weewx-venv/bin/activate
vi) python3 -m pip install weewx (see note* below)
vii) sudo cp ~/weewx-data/util/systemd/weewx.service /etc/systemd/system

note*: It is crucial to install weewx on the source in case there are subtle difference in the underlying systems. I ran up against this when weewx reported after rsync-ing that ephem was not installed when the system reported it was.

3) Use rsync to bring over only the files that have not been recreated on the new system. I transferred the entire user directory since it had other things I used and stored in support of weewx.
rsync -avz --ignore-existing we...@the.ip.address.here:/home/weewx/ /home/weewx/

4) If you have a remote server setup for web display, now is the time to make sure your passwordless ssh keys are in order from new weewx server to the remote server.

5) In a different terminal window, login to the *Old System* and Stop weewx

6) *On the Destination System* : Finalize the startup items and Start weewx
i) sudo systemctl daemon-reload
ii) sudo systemctl enable weewx
iii) sudo systemctl start weewx

You’re done.

As far as I’m concerned, this is a huge step up in terms of portability and ease of use for weewx. Congrats to all who are making v5 happen. Great work and thank you.

Chris


Reply all
Reply to author
Forward
0 new messages