Score:0

Periodic incremental backup of a raspberry pi to another PC?

cn flag
SEU

Hi I have a Raspberry Pi and would like to do an incremental back of the pi to another PC. Below is one method I found.

  1. Install WSL/Ubuntu on the windows PC.

  2. Change the directory to /mnt/c/ on the WSL PC (Essentially in the C:\ of the windows PC)

  3. Run the following command (where 192.168.1.101 is the pi's ip address, and pi_userid is self- explanatory).

    ssh pi_userid@192.168.1.101 "sudo dd if=/dev/mmcblk0 bs=1M | gzip -" | dd of=pibackup.gz

It takes about 40 minutes on a home network to backup 32GB of pi's content. It gets compressed to 1.3GB .gz file on the Windows PC. Actual used space on the SD card was 3.3GB (sudo du -hs / or df -h /).

This creates a file that I need for a backup and the .gz file can be used the raspberry pi imager to write to another SD card. Question is: Is there a way to do an incremental backup?

Nmath avatar
ng flag
Does this answer your question? [Comparison of backup tools](https://askubuntu.com/questions/2596/comparison-of-backup-tools) `dd` is probably the most unwieldy, awkward way to perform regular backup tasks. I'd look into rsync or backup2l
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.