1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/restic_ynh.git synced 2024-09-03 20:16:22 +02:00

fix: update readme

This commit is contained in:
Lionel Coupouchetty-Ramouchetty 2020-03-02 22:30:12 +01:00
parent 255867fb81
commit 6ae80cb566

View file

@ -22,7 +22,7 @@ Firstly set up this app on the server A you want to backup:
$ yunohost app install https://github.com/YunoHost-Apps/restic_ynh $ yunohost app install https://github.com/YunoHost-Apps/restic_ynh
Indicate the server where you want put your backups: serverb.domain.tld Indicate the server where you want put your backups: serverb.domain.tld
sftp port of your server (default: 22): 2222 sftp port of your server (default: 22): 2222
The directory where you want to backup repositories to be created in (default: ./): ./servera.domain.tld The directory where you want your backup repositories to be created in (default: ./): ./servera.domain.tld
Indicate the ssh user to use to connect on this server: servera Indicate the ssh user to use to connect on this server: servera
You are now about to define a new user password. The password should be at least 8 characters - though it is good practice to use longer password (i.e. a passphrase) and/or to use various kind of characters (uppercase, lowercase, digits and special characters). You are now about to define a new user password. The password should be at least 8 characters - though it is good practice to use longer password (i.e. a passphrase) and/or to use various kind of characters (uppercase, lowercase, digits and special characters).
Indicate a strong passphrase, that you will keep preciously if you want to be able to use your backups: Indicate a strong passphrase, that you will keep preciously if you want to be able to use your backups:
@ -30,7 +30,9 @@ Would you like to backup your YunoHost configuration ? [yes | no] (default: yes)
Would you like to backup mails and user home directory ? [yes | no] (default: yes): Would you like to backup mails and user home directory ? [yes | no] (default: yes):
Which apps would you backup (list separated by comma or 'all') ? (default: all): gitlab,blogotext,sogo Which apps would you backup (list separated by comma or 'all') ? (default: all): gitlab,blogotext,sogo
Allow backup method to temporarily use more space? [yes | no] (default: yes): Allow backup method to temporarily use more space? [yes | no] (default: yes):
Indicate the backup frequency (see systemd OnCalendar format) (default: Daily): Indicate the backup frequency (see systemd OnCalendar format) (default: Daily): *-*-* 0:05
Indicate the backup check frequency (see systemd OnCalendar format) (default: *-*-8,15,22 3:15:00):
Indicate the complete backup check frequency (see systemd OnCalendar format) (default: *-*-1 1:15:00):
``` ```
You can schedule your backup by choosing an other frequency. Some example: You can schedule your backup by choosing an other frequency. Some example:
@ -49,11 +51,12 @@ Sat *-*-1..7 18:00:00 : The first saturday of every month at 18:00
5,17:00 : Every day at 5 AM and at 5 PM 5,17:00 : Every day at 5 AM and at 5 PM
See here for more info : https://wiki.archlinux.org/index.php/Systemd/Timers#Realtime_timer
After each invocation an e-mail will be sent to root@yourdomain.tld with the execution log. After each invocation an e-mail will be sent to root@yourdomain.tld with the execution log.
NOTE: After each backup, the repository integrity is checked Restic can check backups consistency and verify the actual backed up data has not been modified.
If you use the default values for the backup checks frequencies, a full check will be made on the first day of each month and a simple check will be made on each one of the three remaining weeks of the month.
See here for more info : https://wiki.archlinux.org/index.php/Systemd/Timers#Realtime_timer
At the end of the installation, the app displays the public_key and the user to give to the person who has access to the server B. At the end of the installation, the app displays the public_key and the user to give to the person who has access to the server B.
@ -67,7 +70,7 @@ cat << EOPKEY >> ~/.ssh/authorized_keys
<paste here the privakey displayed at the end of installation> <paste here the privakey displayed at the end of installation>
EOPKEY EOPKEY
``` ```
If you don't find the mail and you don't see the message in the log bar you can found the public_key with this command: If you don't find the mail and you don't see the message in the log bar you can find the public_key with this command:
``` ```
cat /root/.ssh/id_restic_ed25519.pub cat /root/.ssh/id_restic_ed25519.pub
``` ```
@ -93,17 +96,25 @@ At this step your backup should schedule.
If you want to be sure, you can test it by running on server A: If you want to be sure, you can test it by running on server A:
``` ```
service restic start systemctl start restic.service
``` ```
Next you can check by running on server A Next you can verify the backup contents by running on server A
``` ```
restic -r sftp:serverb.domain.tld:servera.domain.tld/auto_conf snapshots restic -r sftp:serverb.domain.tld:servera.domain.tld/auto_conf snapshots
``` ```
Replace `auto_conf` with `auto_<app>` if you did not choose to backup configuration but only applications. Replace `auto_conf` with `auto_<app>` if you did not choose to backup configuration but only applications.
YOU SHOULD CHECK REGULARLY THAT YOUR BACKUP ARE STILL WORKING. If you want to check the backups consistency:
```
systemctl start restic_check.service
```
If you want to make a complete check of the backups - keep in mind that this reads all the backed up data, it can take some time depending on your target server upload speed (more on this topic in [the restic documentation](https://restic.readthedocs.io/en/latest/045_working_with_repos.html#checking-integrity-and-consistency):
```
systemctl start restic_check_read_data.service
```
## Edit the apps list to backup ## Edit the apps list to backup