1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/borg_ynh.git synced 2024-09-03 18:16:05 +02:00

Merge pull request #130 from Jaxom99/patch-1

[Doc] add history details
This commit is contained in:
Éric Gaspar 2023-02-12 11:37:01 +01:00 committed by GitHub
commit b264c69b68
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 11 additions and 5 deletions

View file

@ -98,12 +98,20 @@ $ BORG_RSH="ssh -i /root/.ssh/id_borg_ed25519 -oStrictHostKeyChecking=yes " borg
``` ```
You will need the passphrase to run ``borg`` commands on the backup repository created on the host Server B. You will need the passphrase to run ``borg`` commands on the backup repository created on the host Server B.
### History Depth and Pruning
The default setup of this app is to have a **one-year history**, with decreasing frequency of backups kept (for each app and each setup's part): 2 in the last hours, 7 in the last days, 8 in the last weeks and 12 in the last months (so 12 in total). All backup older than 1 year are deleted.
It relies on the [pruning behaviour of borg](https://borgbackup.readthedocs.io/en/stable/usage/prune.html) : `--keep-hourly 2 --keep-daily=7 --keep-weekly=8 --keep-monthly=12` implemented [here](https://github.com/YunoHost-Apps/borg_ynh/blob/testing/conf/backup_method#L55).
You may change this behaviour only via the CLI, by modifiyng the file in`/etc/yunohost/apps/borg(__x)/conf/backup_method`, although it will not persist between upgrades.
If your backup server is full, the app will fail and will **not** add new backup while deleting the old ones.
## Check regularly your backup ## Check regularly your backup
If you want to be sure to be able to restore your server, you should try to restore regularly the archives. But this process is quite time consumming. If you want to be sure that you can restore your server, you should try to restore archives regularly. But this process takes a long time.
You should at least: You should at least:
* Keep your apps up to date (if apps are too old, they could be difficult to restore on a more recent recent version) * Keep your apps up to date (if the apps are too old, they might be difficult to restore to a newer version on YunoHost)
* Check regularly the presence of `info.json` and `db.sql` or `dump.sql` in your apps archives * Regularly check the presence of `info.json` and `db.sql` or `dump.sql` in the archives of your applications
``` ```
borg list ./::ARCHIVE_NAME | grep info.json borg list ./::ARCHIVE_NAME | grep info.json
borg list ./::ARCHIVE_NAME | grep db.sql borg list ./::ARCHIVE_NAME | grep db.sql

View file

@ -102,7 +102,6 @@ if [ ! -z "$server" ]; then
# SEND A README FOR THE ADMIN # SEND A README FOR THE ADMIN
#================================================= #=================================================
ynh_print_OFF
message="You should now install the \"Borg Server\" app on $server and with the following credentials: message="You should now install the \"Borg Server\" app on $server and with the following credentials:
User: ${ssh_user} User: ${ssh_user}
Public key: $(cat ${private_key}.pub) Public key: $(cat ${private_key}.pub)
@ -114,7 +113,6 @@ yunohost app install https://github.com/YunoHost-Apps/borgserver_ynh -a \"ssh_us
If you facing an issue or want to improve this app, please open a new issue in this project: https://github.com/YunoHost-Apps/borg_ynh" If you facing an issue or want to improve this app, please open a new issue in this project: https://github.com/YunoHost-Apps/borg_ynh"
ynh_send_readme_to_admin "$message" ynh_send_readme_to_admin "$message"
ynh_print_ON
fi fi
#================================================= #=================================================