From 0281a5970a7946fe855eaec82d297a2a42f8327c Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Sun, 9 Oct 2022 10:13:43 +0200 Subject: [PATCH 1/7] Remove ynh_print_ON / OFF --- scripts/install | 2 -- 1 file changed, 2 deletions(-) diff --git a/scripts/install b/scripts/install index 353ec8d..e89ba36 100755 --- a/scripts/install +++ b/scripts/install @@ -102,7 +102,6 @@ if [ ! -z "$server" ]; then # 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: User: ${ssh_user} 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" ynh_send_readme_to_admin "$message" - ynh_print_ON fi #================================================= From 7340173ffc1aa1bd093f428acc40632b7e30298a Mon Sep 17 00:00:00 2001 From: Jaxom99 <30865395+Jaxom99@users.noreply.github.com> Date: Wed, 2 Nov 2022 22:59:55 +0100 Subject: [PATCH 2/7] add history details as per this solved issue : https://github.com/YunoHost-Apps/borg_ynh/issues/122 --- README.md | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 4e1cc8e..90352e5 100644 --- a/README.md +++ b/README.md @@ -82,12 +82,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. +### 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 -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 to be able to restore your server, you should try to restore regularly the archives. But this process is quite time consuming. 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) - * Check regularly the presence of `info.json` and `db.sql` or `dump.sql` in your apps archives + * Keep your apps up to date (if apps are too old, they could be difficult to restore on a more recent version on yunohost) + * Check regularly the presence of `info.json` and `db.sql` or `dump.sql` in your apps' archives ``` borg list ./::ARCHIVE_NAME | grep info.json borg list ./::ARCHIVE_NAME | grep db.sql From 6d9859979da090ee23bf946b243dfb0bc5c6a4de Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Sun, 12 Feb 2023 11:29:33 +0100 Subject: [PATCH 3/7] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 90352e5..779e1fb 100644 --- a/README.md +++ b/README.md @@ -83,7 +83,7 @@ $ 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. ### 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. +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. From 74f708013d52bc92cc61a22bb6235d683af4181b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Sun, 12 Feb 2023 11:34:55 +0100 Subject: [PATCH 4/7] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 779e1fb..ebb3523 100644 --- a/README.md +++ b/README.md @@ -95,7 +95,7 @@ If you want to be sure to be able to restore your server, you should try to rest 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 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 db.sql From 6fc43ed0872d293c85a6b646fc4be1aacb2513a3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Sun, 12 Feb 2023 11:35:12 +0100 Subject: [PATCH 5/7] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index ebb3523..70d3a5a 100644 --- a/README.md +++ b/README.md @@ -91,7 +91,7 @@ You may change this behaviour only via the CLI, by modifiyng the file in`/etc/yu 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 -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 consuming. +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: * Keep your apps up to date (if apps are too old, they could be difficult to restore on a more recent version on yunohost) From 6e6f6732553666307df704a562abd2c9b456212f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Sun, 12 Feb 2023 11:35:34 +0100 Subject: [PATCH 6/7] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 70d3a5a..a75dd53 100644 --- a/README.md +++ b/README.md @@ -94,7 +94,7 @@ If your backup server is full, the app will fail and will **not** add new backup 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: - * Keep your apps up to date (if apps are too old, they could be difficult to restore on a more recent version on yunohost) + * Keep your apps up to date (if the apps are too old, they might be difficult to restore to a newer version on YunoHost) * 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 From b1c8afac38fd81f5ecbc06c60449f808396590d2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Sun, 12 Feb 2023 11:36:13 +0100 Subject: [PATCH 7/7] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index a75dd53..c343e12 100644 --- a/README.md +++ b/README.md @@ -91,7 +91,7 @@ You may change this behaviour only via the CLI, by modifiyng the file in`/etc/yu 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 -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 +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: * Keep your apps up to date (if the apps are too old, they might be difficult to restore to a newer version on YunoHost)