Open fpoto opened 3 years ago
Dear @fpoto , apologize for our late reply.
Thanks a lot for your contribution. We will take this into account while restructuring our documentation.
Just for the record, since I sent the code one year ago, I have kept using it every night without problems. For me, the code is stable. If anyone has suggestions, I'd be glad to hear from them.
Hello Francesco, we won't forget you and your contribution.
https://github.com/bit-team/backintime/issues/1838
Can you please add some more description. It is not clear to me what your script is doing (and I hate to read bash/sh) and why it should be added as an example script. The question is if your script is a helpful example for other users. My first impression is that it is quit complex for an "example" and that it is doing much more then just one thing.
Basically it is just a wrapper around a night backup called by cron or a manual backup invoked by the gui.
If the backups are kept on a separate partition which is only mounted at backup time, it checks whether it is already mounted and mounts it otherwise, remounts it read-only when it's finished, checks the filesystem and computes the total space used by the backup and the remaining space on the file system
Checks for several errors, including out-of-memory, and reports them on the log of what's happened (mounting, space available before and after backup, possible errors, unmounting).
When called from cron, it emits logging info on the standard output, which cron then emails to the caller.
That's it. If you want, I can write down a more formal list of features and usage.
Thank you for your reply.
I would say your script is not a "regular" example usable for Back In Time (BIT) beginners to learn how user-callback works. It is to complex for this. But I can add it as a real-world example to illustrate how user-callback can be use on an advanced level. It would be great if you could improve the in-code comments in your script and also improve the introducing comments in the beginning to increase the outcome for new users reading the user-callback docu.
btw: I'll soon migrate the user-callback docu and the example scripts into bit-team/backintime repo.
I think my script is not an example for beginners, but a generic complete callback that is really usable in practice by anyone without modification.
What it does:
It is a real-world example which is usable in practice as it is, but I would not call it advanced.
I hope I'll find the time to improve the documentation. Maybe for a start the above explanation would be better than nothing.
Thank you for caring about BIT and my contribution
--
Francesco Potortì (ricercatore) ISTI - CNR, Pisa, Italy
Web: http://fly.isti.cnr.it Skype: wnlabisti
Mobile: +39.348.8283.107 also Telegram, and even Wa
Thank you very much for your efforts.
I am migrating the user-callback docu und examples into "backintime" repo. I will close the issue and setting its repo into "archive mode" in the foreseen future.
I would suggest that you open a PR or Issue with your improved script. Might it be an idea to integrate it directly into the documentation instead of adding it as an example script beside the others?
It would be nice if you could rethink your license of that code. We will use your script in the documentation and/or as an example. Other users might use it or just code snippets of it. Or they use at as in inspiration for their own scripts. With all respect to your work I won't like to bother users with (complex) licensing stuff. A regular user might be insecure about if he/she is allowed to use that code or not. And a user also might not be willing to dive into the topic about licensing to answer this question to him/herself. Again: With all respect to your work it is just a script and not a full application. So I would like to keep it simple for the users. I would suggest CC0-1.0 (public domain) as a "license".
Otherwise it is no big deal if you like to stick to AGPL. This won't be a blocker.
Best, Christian
user-callback.txt Starting from the code I found here as inspiration, I rewrote it and added some things. I have used it every night for six months now and kept improving and debugging it. Should I post it here as a new file? Make a pull request?