Noob how to backup and replace OS drive

  • Hello again to all the helpful people on this forum.


    My next challenge. I'm running my OMV5 install from a 32GB SD card; which has already used 12GB of space (and loses about 10GB for swap files). I want to replace this with a larger SD card and image my OS onto it before physically swapping the cards. I then want to backup the image to one of my RAID arrays.


    I've read a number of forum posts on this but some are 6 or 7 years old and are talking about earlier versions and others seem to take about problems.


    Please can someone give me a total Noddy guide as to how to:-

    a:- clone my OS drive so that I can swap out for a larger card

    b:- backup the larger setup to a RAID array on my NAS.


    Please assume absolutely no knowledge on my part - I won't be offended (I'm not totally dumb but I've only about 2 weeks of OMV and linux experience so its easier to assume I know nothing).


    Massive thank you in advance:)

    • Offizieller Beitrag
    1. Quite a number of users have their boot drive on a 16gig stick with plenty of change left over. If you can’t keep your boot drive on a 32gig stick, you’re doing something wrong.
    2. I am not sure what you mean by backing up your operating system to your RAID array. The best and easiest OS backup involves two 32gig USB thumb drives and the dd command.

    System Backup Typo alert: Under the Linux section the command should be sudo umount /dev/sda1 NOT sudo unmount /dev/sda1

    Backup Data Disk to Backup Disk on Same Machine: In a Scheduled Job:rsync -av --delete /srv/dev-disk-by-uuid-f8814ed9-9a5c-4e1c-8830-426968c20ea3/ /srv/dev-disk-by-uuid-e67439d5-00a3-4942-bd5f-b84ab86aa850/ Don't forget trailing slashes, and BE CAREFUL. (HT: Getting Started with OMV5)

    Equipment - Thinkserver TS140, NanoPi M4 (v.1), Odroid XU4 (Using DietPi): PiHole

    • Offizieller Beitrag
    1. Quite a number of users have their boot drive on a 16gig stick with plenty of change left over. If you can’t keep your boot drive on a 32gig stick, you’re doing something wrong.
    2. I am not sure what you mean by backing up your operating system to your RAID array. The best and easiest OS backup involves two 32gig USB thumb drives and the dd command.

    I would 100% agree w/ this. I have quite a bit going on on my server and my root partition is about 3 gigs.

    • Offizieller Beitrag

    Please can someone give me a total Noddy guide as to how to:-

    a:- clone my OS drive so that I can swap out for a larger card

    There's a little primer on preparing flash media to be a boot drive - here. Then look - here for guidance on cloning boot drives. You may find other topics useful in this guide as well.

    • Offizieller Beitrag

    I'm sorry. I could have been a bit more helpful above. There may very well be issues with your boot drive filling up with docker files or a rsync job going to the boot drive because of a missing data drive, etc. You might describe what you are doing with your OMV install, and what kind of hardware you are using. But crashtest is on target just above. Verifying the integrity of your media before you commit your operating system to it, and backing up your system as soon as you get it up and running, and then at every major os update is a must if you want to avoid headaches later on. Both Mac and Linux there are tons of guides on the internet for using the dd command to backup a sd card or usb thumb drive. Here are a couple: Mac   Linux For Windows It's something else. crashtest has a good guide for that in his Getting Started guide in the guides section of the forum. Hope that helps.

  • Thank you all. Some more info. I have a HP DL380P its an old 12 bay server with 2 xeon processors. It has 12 disks in forming a snapraid array with unionfilesystem to make it 1 drive. All of the familys photos, music, movies and images of laptops are stored on it. It is also running plex.


    OMV is running from a 32GB high endurance SD card. The flash memory plugin has also been used.

    When I look in "File Systems" I can see /dev/sdo1 in ext4 filesystem which is my SD card, with Total space 21.29GiB; 7.39GiB available and 12.79GiB used. I can also see /dev/sdo5 which is swap file system.


    I've used the du command to look at folder sizes.

    My /var/log folder is 5.4G which I'm guessing it rather large and ./daemon.log.1 is 3.8G on its own. with /daemon.log being 805M and /syslog.1 being 555M.

    My /var/folder2ram is 6.8G. Digging down this a little the /var/folder2ram/var/log folder is all of this.


    Do I have a logging problem, can I clear all the logs? How do I clear all the logs?


    Thank you all

    • Offizieller Beitrag

    I'd be looking at your logs. Something is obviously getting written a LOT to have a log folder that size.


    Some perspective....


    Filesystem Size Used Avail Use% Mounted on

    /dev/sdc1 51G 3.7G 45G 8% /

    root@openmediavault:~#

    • Offizieller Beitrag

    I have to say, I haven't heard of or seen or a case with "gig's of log files". That's a LOT of logs. On the other hand, if you haven't relocated the Plex metadata base, several gig's of metadata is not uncommon.


    Deleting Logs? Never had to do it but the deamon.log appears to have entries RE mounting hard drives and, with 12 drives, you have a lot going on. Here's a -> command line method but that may be a bit complicated.

    I believe the easiest way to purge old logs would be to use the GUI:


    Under Diagnostics, System Logs, in the Logs tab, there's a drop down arrow on the right. Select the Daemon log and click the Clear button. (Given the size of your logs, it might take some time to complete.)

    Run du again to check it out. (The Daemon log will, pretty much, instantly begin to repopulate but it should far smaller.)

    You can do the same to trim a number of other logs, in this location. I'd start with this first.

    • Offizieller Beitrag

    Have you changed your docker storage path from the default?

  • Thank you. Plex (and all of docker) is in a different area. I was able to clear the logs and I'm down to a much less worrying 5GiB. It may still be a little large but I'm much happier. I really appreciate the help from you all. Now for adventures with DD - more idiot questions to follow :D

    • Offizieller Beitrag

    In folder-to-ram (or any log file), there's no penalty for deleting compressed log file archives. *log.gz


    If you have big primary log files *.log or *.log1, and if you have WinSCP installed, you can open the file by double clicking it. Once inside the file, Cntrl+A selects all, the delete key clears it, then save it (upper left hand corner).

  • bleachbit can be used for deleting old logs and other stuff. I use GUI version under my Linux system, but there is also CLI (command line) version.


    Also logrotate actually does exactly that - zips old logs to an archive file and keep them for a certain amount of days / weeks then delete them. You can re-configure it to delete them sooner.

    OMV7 on RPi4B, WD elements 4TB

    Einmal editiert, zuletzt von greg77 ()

Jetzt mitmachen!

Sie haben noch kein Benutzerkonto auf unserer Seite? Registrieren Sie sich kostenlos und nehmen Sie an unserer Community teil!