Backup in another place

Have some feedback, questions, suggestions, or just fancy a chat? Pop it in here.
Post Reply
omavoss
Posts: 48
Joined: Thu Sep 24, 2020 11:08 pm

Backup in another place

Post by omavoss »

Hey,
I would like to store a backup of the DietPi configuration on the micro SD card with DietPi in a different place than on the card itself. How should I proceed?

Thank you very much.
User avatar
Joulinar
Posts: 4536
Joined: Sat Nov 16, 2019 12:49 am

Re: Backup in another place

Post by Joulinar »

Hi,

you can use an USB stick (as I do) or use a NFS share. Just change the location inside dietpi-backup to your attached storage.
Pls let us know if a solution is working. This could help others if they hit by similar situation. Your DietPi Team
omavoss
Posts: 48
Joined: Thu Sep 24, 2020 11:08 pm

Re: Backup in another place

Post by omavoss »

@Joulinar:
Is the USB stick mounted automatically or do I have to mount it manually? Will the then new location be mounted automatically?

So, as I understand it, this means that in case of a system restore I have to recreate an SD card with DietPi, then plug in the USB stick with the backup and restore the system from it?

Please: I am not a Linux expert, but would still like to understand how it works.

Kind regards.
User avatar
Joulinar
Posts: 4536
Joined: Sat Nov 16, 2019 12:49 am

Re: Backup in another place

Post by Joulinar »

It basically quite simple,
  1. plug the USB stick in your SBC
  2. run dietpi-drive_manager and mount your USB stick to something like /mnt/usb
  3. leave dietpi-drive_manager
  4. run dietpi-backup
  5. select Location > Manual and enter /mnt/usb/dietpi-backup
  6. go back to main menu and run the Backup
  7. as well a backup can be created from CLI via dietpi-backup 1
  8. that's it. On next Backup the USB stick will be mounted automatically
If needed the backup can be restored on the current system or on a fresh install. If you like to restore the backup on a fresh install, just do following
  1. download a new image
  2. flash the image to SD card
  3. once done place the SD card back to your computer
  4. open dietpi.txt in the bootFS
  5. ensure restore value set AUTO_SETUP_BACKUP_RESTORE=1

    Code: Select all

    # Restore a DietPi-Backup on first boot: 0 => disable | 1 => interactive restore (show list of found backups) | 2 => non-interactive restore (restore first found backup)
    # - Simply attach the drive/disk/stick with contains the backup. All attached drives will be mounted temporarily and searched automatically.
    AUTO_SETUP_BACKUP_RESTORE=1
  6. this will scan your USB drives on first boot and provide a list of backups found
  7. just select you backup, wait a moment and reboot your system afterwards
thats it. 8)
Pls let us know if a solution is working. This could help others if they hit by similar situation. Your DietPi Team
Post Reply