Following pages describe different usage scenarios and configurations. They should help to find the right usage configuration out of the various configuration options of raspiBackup. Later on these usage scenarios can be customized further. An overview of all option is available here. The different ways to restore a backup are described here.

All configurations which don't use a dd backup save an external rootfilesystem together with the SD boot partition. If the USB bootmode is used and no SD card is used any more the whole rootpartition is also saved.

 

Usage scenarios described:

1a. A Windows user wan't to backup his Raspberry and restore it with windisk32imager on Windows.

1b. A Windows user has a 32GB SD card but uses only 12GB and 12GB should be saved only.

1c. A Windows user wants to use pishrink to create a minimal backup image.

2. Raspberry should be saved very fast. Backuppartition is a nfs mounted EXT4 partition which is provided by a Synology.

3. Raspberry should be saved on a Samba mounted filesystem, which is provided by a Windows box.

4. A snapshot should be saved because there are some major changes planned and it should be possible to revert quickly.

5. A NOOBS SD card should be saved.

 

 

1a. A Windows user wan't to backup his Raspberry and restore it with windisk32imager on Windows.

Just create a dd Image with raspiBackup. This one can be restored with windisk32imager.

DEFAULT_BACKUPTYPE=dd

DEFAULT_KEEPBACKUPS=n

 

1b. A Windows user has a 32GB SD card but uses only 12GB and 12GB should be saved only.

In addition to option mentioned in 1a use following option:

DEFAULT_DD_BACKUP_SAVE_USED_PARTITIONS_ONLY=1

But you also have to reduce the size of your rootpartition because otherwise the whole SD card will be saved. You have to use Linux tools like gparted or resize2fs to shrink your rootfilesystem.


1c. A Windows user wants to use pishrink to create a minimal backup image.

A minimal dd image can be created with pishrink. Use raspiBackupWrapper.sh which will shrink the dd image at the end. You also can use option

DEFAULT_ZIP_BACKUP=1

to reduce the image but this compressed dd image cannot be used by windisk32image


2. Raspberry should be saved very fast. Backuppartition is a nfs mounted EXT4 partition which is provided by a Synology.

Mount your Synology first. Define in /etc/fstab the nfs partition and mount it on /backup.

DEFAULT_BACKUPTYPE=rsync

DEFAULT_KEEPBACKUPS=n

Because the filesystem is EXT4 formatted raspiBackup can use hardlinks which speeds up the backup process because only changed files are saved.

A sample entry in /etc/fstab may look like:

asterix:/backup    /backup    nfs    users,rw,sync,hard,intr,noauto,user    0    0
asterix is the hostname of the Synology and /backup is the exported nfs mount. Additional information about Synology specific configuration and any issues with Synology configuration is available here

 

3. Raspberry should be saved on a Samba mounted filesystem, which is provided by a Windows box.

DEFAULT_BACKUPTYPE=tar

DEFAULT_KEEPBACKUPS=n

Define the remote Windows backupfilesystem in /etc/fstab definiert and mount it on /backup. Every backup is a full backup. Note the filesystem on the samba driver has to support file sizes  > 4GB because tar files usually are > 4GB. Don't use FAT32 for this.

A sample entry in /etc/fstab may look like:

//asterix/backup/ /backup    cifs    noauto,noatime,user,utf8,umask=000,uid=1000,gid=1000,credentials=/etc/samba/auth.asterix.cifsuser 0 0

 

4. A snapshot should be saved because there are some major changes planned and it should be possible to revert quickly.

Use one of the previous configurations. Than call raspiBackup with option

-m "This is my snapshot just before upgrading my OS"

and you will get a backup in /backup which has exactly this name.

5. A NOOBS SD cards should be saved.

NOOBS has more than 2 rartitionen. Therefore the partition oriented backup has to be used. Please read following advice about NOOBS.

DEFAULT_PARTITIONBASED_BACKUP=1

DEFAULT_BACKUPTYPE=tar

DEFAULT_KEEPBACKUPS=n

Add comment

Note

Spam comments are purged and not published. Review is done manually and therefore it usually takes between some hours and one day until a comment will be published.