Star InactiveStar InactiveStar InactiveStar InactiveStar Inactive
 

pishrink is a useful tool to reduce the size of dd images to it's minimum. When the image is booted the image expands the root partition to it's possible maximum size. You can shrink an image created by raspiBackup by using the helper script raspiBackupWrapper.sh. Following paragraph describes in detail how to configure raspiBackup to shrink dd backup images with pishrink.

 

 

First install and configure raspiBackup. See this page for details. When you managed to create a dd backup download raspiBackupWrapper.sh from github

wget https://github.com/framps/raspiBackup/blob/master/helper/raspiBackupWrapper.sh

sudo mv ./raspiBackupWrapper.sh /usr/local/bin

sudo chmod +x /usr/local/bin/raspiBackupWrapper.sh

Now download and install pishrink

wget https://github.com/Drewsif/PiShrink/blob/master/pishrink.sh

sudo mv ./pishrink.sh /usr/local/bin

sudo chmod +x /usr/local/bin/pishrink.sh

 

Then activate /usr/local/bin/raspiBackupWrapper.sh

1) Change

BACKUP_MOUNT_POINT="/remote/backup"   

so it defines the used backup mount point.

2) Change

#sudo pishrink

and delete the leading #

 

Now test raspiBackupWrapper.sh

sudo raspiBackupWrapper.sh

 

Finally change /etc/cron.d/raspiBackup

00 05 * * 0 root /usr/local/bin/raspiBackup.sh

to

00 05 * * 0 root /usr/local/bin/raspiBackupWrapper.sh

That's it :-)

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.