I just put everything on the SSD, so there’s no SD card to fail. It turned out to be really easy (running Debian Buster):
1. With the RPi set up on an SD card, shut down, plug in the SSD, and start up the RPi. Don’t try to mount it or anything; if the system tries to mount it automatically, tell it no. 2. Figure out what “device” is associated with the SSD. It’s probably /dev/sda as long as you don’t have any other storage like a USB stick. (If you do, take it out.) Running “fdisk /dev/sda” is a good way to check — a “p” command should show a storage device of the correct size. 3. Shut down weewx, any database, and any other services that aren’t necessary for running the OS. Probably the best thing is to boot into single-user mode, but I didn’t bother with that. The important thing is to make sure weewx (and mysql, if you use it) are shut down. 4. Copy the image of the SD card to the SSD. dd bs=1M if=/dev/mmcblk0 of=/dev/sda should do it, assuming your SD card is /dev/mmblk0 and the SSD is /dev/sda. 5. Then shut down, remove the SD card, and start the RPi back up. It should just boot from the SSD, and look just like it did before. The last step is to launch raspi-config and run “Expand Filesystem" from the Advanced menu to resize the filesystem to use the available space on the SSD. For some reason I had to do this twice; the first time only got about 90% of the space. Note that you need to reboot after each resize. This worked for me on an RPi 3 B+, and should be fine on a 4. It may not work on pre-3 versions. Also, you should probably do an update/full-upgrade before starting, in part to make sure you have the latest firmware. -Les > On 27 Feb 2021, at 16:16, Ken Asmus <ken.as...@gmail.com> wrote: > > I am a very new user of Raspberry Pi and a LINUX neophyte! > > I have WeeWx running now on my RPI4 and it is working fine. > > I have read in numerous locations about the limited life of the micro SD > cards. So I acquired and mounted an external SSD drive to my RPI4. > > But how do I save the database and any other files that are are being swapped > to the SD card to the SSD to decrease wear on the SD card? > > Any guidance will be appreciated. > > Thanks > Ken > > > -- > You received this message because you are subscribed to the Google Groups > "weewx-user" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to weewx-user+unsubscr...@googlegroups.com > <mailto:weewx-user+unsubscr...@googlegroups.com>. > To view this discussion on the web visit > https://groups.google.com/d/msgid/weewx-user/6f74a17e-080a-4889-8475-35bd3b25e9acn%40googlegroups.com > > <https://groups.google.com/d/msgid/weewx-user/6f74a17e-080a-4889-8475-35bd3b25e9acn%40googlegroups.com?utm_medium=email&utm_source=footer>. -- You received this message because you are subscribed to the Google Groups "weewx-user" group. To unsubscribe from this group and stop receiving emails from it, send an email to weewx-user+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/weewx-user/2982F601-E15E-46D2-A5FF-3B772CDD3866%402pi.org.