On 07/09/2020 14:21, Martin Gregorie wrote:
> On Mon, 07 Sep 2020 11:31:08 +0100, NY wrote:
>
>> I also started making a disk image of the card every few months so I
>> could go straight back to a reasonably recent state without needing to
>> reinstall.
>>
> Assuming you're making backups with dd or tar, zip etc, you might want to
> look into using rsync instead:
>
> - its faster because it does the minimum work needed to bring your last
> backup up to date
>
> - its more flexable because its copying files and directories into a
> backup filing system which gives you direct access, should you need it,
> to individual files on the backup volume and recovery to a differently
> sized disk partition is a lot easier than doing so from a backup made
> with dd.
I've got my dozen Pi's set up to backup nightly on to images on a NAS
drive. I first make an image of each Pi's SD card using dd, then as part
of the backup cron job, create a loop device for the image and mount it,
then use rsync to backup whats changed each day. I've then got a weekly
and monthly cron which bzips the images on to another backup disc.
The advantage of doing this, is if an SD card fails, you have an "oven
ready" uncompressed image ready to dd straight on to a new card. It also
means you can back up on to non-native network filing system such and
preserve all the file attributes.
I was using a USB3 drive attached to my router as a NAS, which
ironically was actually ext4 formatted, but the router would only share
via SMB, which meant using images was necessary. I've retired that and
am now using same drive attached to a Raspberry Pi 4. As that has USB 3
and gigabit Ethernet, its actually twice as fast as the router as a NAS.
Another big advantage is it can share the drive as both SMD and NFS.
Which means I could backup straight to the drive over NFS without using
images, still preserve all the attributes, and it would take up quite a
bit less space. In case of SD card failure, I would just have to
partition the new card, and copy the files on, rather than using dd.
---druck
--- SoupGate-Win32 v1.05
* Origin: Agency HUB, Dunedin - New Zealand | FidoUsenet Gateway (3:770/3)
|