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

Add -one-file-system and -progress options to backup commands #78

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

Juanc1to
Copy link

We were finding that when doing backups, we wanted an option to skip folders that are mount points for other file systems. We also wanted to be able to get more feedback that the backup was progressing. The two options -one-file-system and -progress meet these needs, respectively. We have implemented them here for both local and duply-mediated backups.

John Clark added 2 commits June 21, 2023 21:21
Add features for excluding mounted filesystems from backups and for showing more progress during the backup process.
@QROkes
Copy link
Owner

QROkes commented Jun 21, 2023

Hi John,

Not sure about the whole impact, but after considering your PR I'm now thinking that maybe restricting everything to the current filesystem by default could be a better idea, not an option.

  • We can use the CP and TAR commands always with "-x" parameter, by default.
  • Always include the "exclude-other-filesystems" by default in Duply.
  • Another option, duply conf file has an option to include any custom parameters (as a temporal solution), or maybe we can set it here always and that way any user can remove it easily (just in case).

What do you think? Any downsides?
Regards.

@Juanc1to
Copy link
Author

If we made this the default restriction, would we provide an option to webinoly to turn this restriction off?

(As a minor note, it looks like for cp, the -x and --one-file-system arguments are synonyms, but tar only has --one-file-system (and -x means an extract operation).)

@QROkes
Copy link
Owner

QROkes commented Jun 22, 2023

This parameter in the Duply conf file will be very easily manually removed.

In the case of the CP and TAR used internally, I don't think we need an option to disable this parameter. Not sure, but cannot think of any case that can cause a possible conflict.

@Juanc1to
Copy link
Author

Yeah, I think that makes sense to me. Would you like me to submit a new PR implementing this approach?

@QROkes
Copy link
Owner

QROkes commented Jun 23, 2023

Just for a better comprehension of this use case: Can you please explain why you need multiple filesystems in a folder that is publicly exposed (/var/www/example.com)? It caught my attention because you are using this option for cloning sites.

@Juanc1to
Copy link
Author

Sure: we are currently using s3fs to mount our WordPress .../wp-content/uploads directory from a remote S3-compatible store. This setup leads to lower server costs. Also, we clone sites (including production sites) to use for testing, development, or staging, and in these cases it is much faster to skip the content of the uploads directory while cloning and then re-mount it after the cloning process has completed. In addition to cloning, this has similar benefits for backups.

At this point this is a question of advice around server administration, but do you think this sort of strategy makes sense?

@QROkes
Copy link
Owner

QROkes commented Jun 23, 2023

Ok. It makes total sense!

  • Now I have scheduled this improvement to be included in the next minor release (v1.17.5).
  • You don't need to submit a new PR.
  • I will include this feature by default in all the internal CP and TAR commands.
  • For backups, I will add the "--exclude-other-filesystems" parameter in the Duply conf file for each new profile. This way can be easily removed.
  • The progress parameter I think can be included by default in Duply.
  • The verbose parameter (for export and cloning) I think can result unnecessary noisy for most users.

Any comment/suggestion is welcome!

These options were enabled for server backup, but site backups were overlooked, so this fixes that oversight.
@QROkes
Copy link
Owner

QROkes commented Sep 21, 2023

This feature will be moved to the next major release v1.18.0.

I've been thinking of a new approach, including an option in the Webinoly Configuration file to enable or disable the "One-File-System" globally. For example:

  • If it's enabled, every new profile created for backup will have this mode enabled by default.
  • Cloning a site will take this value.
  • Etc.

Any thoughts?

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