FlightAware Discussions

Copy current SD card

I’m getting a warning my SD card is at 97% capacity.

I’ve tried the suds raspi-config command and the option 1 command isn’t available on this configuration.

Can I copy the current configuration to a new SD card or do I need to rebuild the card entirely?

You should be able to back it up and install it on a larger card.
win32diskimager and balena etcher should be able to do this.
You will need to run the expansion option after you do it.

2 Likes
1 Like

@trfd - you certainly can clone the current SD card onto a bigger one but something is obviously filling up the drive. If you address that, you may not need to clone.

Logs are a big space user and there may be something going on spewing messages. Depending on how long your system has been running, it could just be a normal consequence of routine log messages.

If you are interested in sorting the issue instead of just cloning (which may or may not get you years more time depending on what’s going on) try this:

raspberrypi: cd /
raspberrypi: sudo du --max-depth=1 -S -h | sort -h

Note these are command line commands so you need to ssh in or get a console window. The raspberrypi: bit is your prompt and may vary depending on what name you gave your pi when you set it up. The cd / and sudo… are things you type.

What this does is move you to the root (top level) directory (cd /) and then the second command asks the OS to look at how much space each top level directory is using and provides a sorted human readable number for the space of the files in those top level directories.

You will probably get some spurious messages about /proc which you don’t need to worry about, but after that you will get a list of top level directories with the space the files in those directories take up preceding the directory name.

I will bet the the last directory will be /var with a very big number in front of it but maybe not. Whoever the winner is will hopefully give an indication of what to do next. I suspect your pi has just been running a long time and you have some log files that have gotten really big or for some reason haven’t been being rotated out to clear space. But we need this information to see what’s going on and figure out next steps.

Or you can clone the SD card onto a bigger SD card and expand the “disk” to fill the new card.

Good luck!

3 Likes

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.