USB 3 SD card for back up
David R. Lane (77) 766 posts |
I have been advised to backup the Linux USB stick on a dual boot Raspberry Pi 4 to a 128GB USB 3 drive using “SD Card Copier”. I have a 128GB SanDisk Ultra microSDXC UHS-1 card. It has a speed of “up to 100MB/s** 667X”, but the card(board) that it is attached to doesn’t mention a USB rating. Will it do, or will it take an age to do the backup or an age to write back to the USB stick if the latter gets s corrupted? |
David J. Ruck (33) 1635 posts |
What is the USB3 drive – hard disk or SSD? The fastest it could copy the entire stick is 128G/100M seconds ~ 1280s, how fast it actually goes depends on the hardware and assuming both are on a USB3 port, there are many variables, but you’d probably not get better than 50% of the maximum performance for sustained copying. However how long it takes to restore isn’t the issue, it’s how long and how inconvenient it is to do the back up in the first place, as copying an entire drive image is slow and unnecessary. After you’ve made one full image copy, you need to switch to far quicker incremental backups, and do them regularly. My 14 Linux Raspberry Pi’s are automatically backed up at 4am over the network to a USB drive, and that drive is backed up off site to an off site drive. |
David R. Lane (77) 766 posts |
From the instructions I read, I assumed that USB 3 drive was an SSD card from “using SD Card Copier”. So, to copy, it would take at least 20 minutes or even 40 minutes on one of the USB 3 sockets from what you have said. Maybe I need to buy a USB 3 128GB SD card. I didn’t know that SD cards had a USB rating. I have told my Wife that another RISC OS user has 14 Raspberry Pis as she thinks I have too many at about half that number! |
David J. Ruck (33) 1635 posts |
I’m struggling to make sense of what you have said. SD card’s don’t have a USB rating, but an external USB card reader does. Most laptops have a built in card reader which as fast as a USB3 external reader, unless it is really old. If USB2 is involved anywhere it will be about 5x slower to make a copy. NOTE: The Raspberry Pi 4B’s internal SD card reader is quite fast, but you cannot copy the drive which you have booted off with a whole card copying program, it will end up corrupted. You can do an incremental file level backup from a running system. So:-
|
David R. Lane (77) 766 posts |
Hello Druck! I am also confused due to the imprecise language used. It seems I need a 128GB USB 3.1 stick, not a 128GB card, according to the instructions I am following. Presumably, a Linux application called SD Card Copier will copy from USB stick to USB stick? Does anyone know of any good brands of 128GB USB 3.1 sticks apart from SanDisk which I already know about? |
Stuart Swales (8827) 1357 posts |
First of all, have you fired up ‘SD Card Copier’ on Linux to see if it presents your Linux USB stick as a valid backup source? If if does, then you can likely just use your big SD card in a USB card reader(writer) as the backup destination. |
David J. Ruck (33) 1635 posts |
David each reply raises more questions than it answers. What instructions are you following? |
David R. Lane (77) 766 posts |
Yes. It shows two sources: what must be the SD card stuck in the Raspberry Pi 4, and a USB stick (claims to be USB 3.2Gen1). It’s the USB stick I need to back up. |
David R. Lane (77) 766 posts |
I have now got a 128GB USB3 stick to back up the 128GB Linux USB3 stick on my Raspberry Pi 4. Using SD Card Copier on the Linux side, the “Copy From Device” field offers 3 options, SA32G (/dev/mmcblk0), USB SanDisk 3.2Gen1 (/dev/sda) and USB SanDisk 3.2Gen1 (/dev/sdb). I know it’s not the first one, but which of the other 2? One of the last two is the blank USB stick and the other has all the Linux stuff on which I need to back up. If I get the “Copy From” and the “Copy To” entries the wrong way round I end up with 2 blank USB sticks. :-(( From experimenting with the two USB sticks, without any copying, I think I need to copy from /dev/sda to /dev/sdb. Also, USB SanDisk 3.2Gen1 (/dev/sda) does not appear as an option for the field “Copy To Device” whatever I enter in the “Copy From Device” field. |
Jeffrey Lee (213) 6048 posts |
The “lsblk” and “df” commands (entered in a Linux terminal) are a couple of ways of finding the info you’re after. lsblk lists the name of each block device (sda, sdb, etc.) and its mount point (e.g. “/” is the main linux FS, “/boot” is the kernel + bootloader). df lists free disk space for each device/partition (with “df -h” giving more human-readable numbers), but it also lists the path of the block device (e.g. /dev/sda) and the filesystem mount point. The above two won’t include the device name (“USB SanDisk 3.2Gen1” etc.) – I don’t know of a good way of getting that. |
David R. Lane (77) 766 posts |
I used your two suggested commands and they confirmed what I thought: what I reckoned was the USB stick with the Linux stuff on didn’t appear in the options for the “Copy To Device” field. I still held my breath, though, as SD Card Copier did it’s work. Both USB sticks work. Thanks for your help. SD Card Copier doesn’t prevent one copying from a USB stick to the Raspberry Pi’s SD card, according to the options suggested, and so it isn’t that smart. Also, it seems, you still need the command line to distinguish between the two USB sticks. |