My external HDD replacement plan -- advice needed

I guess you mixing thinks.

That’s my specialty!

I’ve confirmed now that /mnt/media/ is now pointing to the new drive. After modifying fstab, I restarted all my services, and sab immediately told me it couldn’t write to /media. I assume this is because of that mount -o remount,ro /mnt/media command I ran before running rsync. But a restart fixed everything.

yes, a reboot was necessary to appley the new mount setting. Just changing them on fstab did not perform any re-mount :wink:

2 Likes

Do I have to turn swap back on manually after issuing the swapoff -a command? I notice, looking at RPi-Monitor, that my swapfile is only just under 13MB.

dietpi@DietPi:~$ cat /proc/meminfo | grep Swap
SwapCached:         2184 kB
SwapTotal:       1115132 kB
SwapFree:        1102076 kB

just run following. It will appley all necessary settings automatically

/boot/dietpi/func/dietpi-set_swapfile

Btw, to install rsync:

apt install rsync

I just verified that indeed a trailing slash is required at the source directory to copy the content instead of the directory. In dietpi-sync we also add it to the target directory, but I guess it is not necessarily required. If the target directory does not exist yet, I guess omitting both trailing slashes would work as well.

You can remove the old mountpoint:

rmdir /mnt/1627f155-5a19-4bc8-80ee-1e01ff08b8cb

Generally it would have been possible to do the /etc/fstab adjustment via dietpi-drive_manager, unmounting the old drive and mounting the new one to /mnt/media. Removal of the old mount point is then done automatically. But editing /etc/fstab of course works fine as well.

It is about 1 GiB as size. The unit is KiB :wink:. swapon -a works as well to re-enable the swap file, or just reboot. It is also in the /etc/fstab to be mounted at boot.

1 Like

I saw here in order to copy the entire drive, symlinks and all

rsync -aAXv 

How To Backup Your Entire Linux System Using Rsync - OSTechNix

  • -aAXv - The files are transferred in “archive” mode, which ensures that symbolic links, devices, permissions, ownerships, modification times, ACLs, and extended attributes are preserved.
1 Like

@nicheplayer one last request from my side. Pls select one of the answers as solution and we could document it as solved :smiley:

1 Like