srgl / backer

Backer volume plugin
MIT License
13 stars 0 forks source link

A few questions #1

Open seertenedos opened 4 years ago

seertenedos commented 4 years ago

Plugin looks like what I have been looking for. I just had the following questions

  1. Why does it use filesystem in a single file? What is the benefits over just using a normal folder that gets bind mounted into the container?
  2. If you specify say a 5gb volume will the file take up all 5gb even if the data uses say 5mb?
  3. Is there a way to make one that can expand as much as it needs to instead of being fixed size?
  4. What happens if your volume uses all its allocated space? I assume you get an out of space error but I thought to check.
  5. Can you set it to auto backup when a volume is no longer in use or will be destroyed.
  6. If 5 above is possible can it be made to restore it automatically if the volume does not exist on volume create if there is a backup for it.

This seems perfect for my use case of backups as well as move volumes between hosts.

seertenedos commented 4 years ago

I think i can answer some of these myself now

  1. Single file means you don't need to worry about permissions when doing backup and the space usage in backup seems to be just the data not the empy space.
  2. yes that is possible but if it does not exist it errors.
seertenedos commented 4 years ago

2 more question

  1. Since it does not seem to backup on unmount or removal is there a way to force a backup to happen via a call or something?
  2. Is there a way to update the settings such as the cron times on a volume without deleting all the local data?
srgl commented 4 years ago

Hey @seertenedos, sorry for a late reply. 1) The main reason is that the plug-in uses the fsfreeze Linux call in order to freeze partition before backup. And the fsfreeze cannot be used with a directory, only with a partition. 2) The data will only take 5mb or a little more because the loopback partition is expanding automatically. 3) Yes, it is by default. 4) There will be an unexpected error, please choose appropriate size. 5) A volume is being backed up only when it is mounted to a container. It will be not destroyed after unmount. 6) If a volume does not exist then it will be restored from a restic repo. 7) Please open a feature request. 8) For now I think there is no a simple way to do it.