Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support external mounted partitions #748

Open
framps opened this issue Apr 7, 2024 · 8 comments
Open

Support external mounted partitions #748

framps opened this issue Apr 7, 2024 · 8 comments
Assignees
Labels

Comments

@framps
Copy link
Owner

framps commented Apr 7, 2024

As of now only the boot and root partition are saved in normal mode. Partition oriented mode can be used to backup additional local partitions but they have to reside on the same device as the root partition.

It' quite common to have additional data on other external partitions (not on the root device) which also should be saved.

Right now tar and rsync uses option -X which causes them to stay on the same device. Either -X should be removed and all external mounted partitions excluded if they are not included in an option or the included partition will be saved in a following step.

@framps framps added the feature label Apr 7, 2024
@framps
Copy link
Owner Author

framps commented Apr 20, 2024

Backup

  1. An additional configuration option DEFAULT_MOUNTPOINTS_TO_BACKUP and option -X allows to define a list of mountpoints of partitions to be included in the backup. The backup type selected for the OS is used also to save these partitions (tar or rsync). Backuptype dd doesn't support additional partitions.
    Example: DEFAULT_MOUNTPOINTS_TO_BACKUP="/influxDB /mnt/videos /mnt/photos. Default is an empty number of mounts to backup.
  2. The additional partition backups are stored in an encoded backup directory in the backup. Every / will be substituted by _. Therefore a mountpoint which includes _ is not supported. In addition a mountpoint has to be absolute and start with /.
    Example: /home/pi/my/mountpoint will be store in the backup directory as _home_pi_my_mountpoint.
  3. The partitions are saved in the sequence they are defined in the option
  4. Only local mounted devices are supported. Network mounted partitions (nfs, samba, ...) are not supported.
  5. This new feature is available only in the partition oriented mode.

Restore

  1. The restore uses the same mountpoints as used in the backup and can be derived from the subdirectory name used in the backup (encoding see above). If there is no partition mounted on any mountpoint the restore fails. This is tested before the restore starts.
  2. Configuration option DEFAULT_MOUNTPPOINTS_TO_RESTORE will allow to define which external partitions should be restored. Default is an empty number of mounts to restore. Corresponding option is -X .

Installer

See #762

@framps framps changed the title Support to include other mounted partitions in the backup Support mounted partitions in the backup Apr 20, 2024
@framps framps changed the title Support mounted partitions in the backup Support mounted partitions Apr 20, 2024
@framps framps changed the title Support mounted partitions Support external mounted partitions Apr 20, 2024
@codkan
Copy link

codkan commented Apr 21, 2024

Just to double-check, this means that I would be able to include my external hard drive mounted to /media in the full backup, right? Because that would be amazing, it's the only thing I'm missing from raspiBackup

@framps
Copy link
Owner Author

framps commented Apr 21, 2024

I would be able to include my external hard drive mounted to /media in the full backup

Yes 😄

@codkan
Copy link

codkan commented Apr 21, 2024

That's incredible, can't wait!

@codkan
Copy link

codkan commented May 14, 2024

Any update on this??

@framps
Copy link
Owner Author

framps commented May 15, 2024

You can check on the issues page which issues I'm working on right now 😉

@framps framps self-assigned this May 23, 2024
framps added a commit that referenced this issue May 23, 2024
@codkan
Copy link

codkan commented Jun 19, 2024

How's this coming along? Can't wait to finally backup all my external media along with my system

@framps
Copy link
Owner Author

framps commented Jun 19, 2024

Keep in mind I work on raspiBackup in my spare time and not 8 hours every day. You don't speed up the implementation of this feature if you ask for progress all the time.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants