Auto Pi Backup to NAS

Backup your rasp pi to a NAS

Auto Pi Backup to NAS

Set up CIFS Mount

Mount CIFS (common internet file system)

sudo mount -t cifs // /media/sd/backup/ -o user=user

Mount on Boot

Using fstab is a bit risky, instead add a script in say root eg:

add the mount command with password={pwd}

sleep 30 # time for network to come up
mount -t cifs // /media/sd/backup/ -o user=user,password=pwd

then crontab -e and @reboot /root/

chmod +x

crontab -e
@reboot /root/


Framps tools

Using the following:

Once downloaded run

Chose dd/windows rather than rsync.


Cron is here:


# Crontab entry for
# (C) 2017-2019 framp at linux-tips-and-tricks dot de
# Create a backup once a week on Sunday morning at 5 am (default)
00 03 * * 0 root /usr/local/bin/ 

The above does a weekly backup on Sunday at 3.00 am.

Manually test:

nohup /usr/local/bin/ &


For DD backups the Windows32DiskImager can be used to restore the backup. A backup can also be restored with Raspberry Pi.  

TAR or RSYNC backups have to be restored with Raspberry Pi.

For mac you can use the following to restore the image to SD card: