Différences
Ci-dessous, les différences entre deux révisions de la page.
| Les deux révisions précédentes Révision précédente Prochaine révision | Révision précédente | ||
| genea:gramps:synchro-gramps-web [2025/11/29 09:03] – jpmilcent | genea:gramps:synchro-gramps-web [2025/11/29 09:11] (Version actuelle) – [Scripts Bash de Synchro] jpmilcent | ||
|---|---|---|---|
| Ligne 7: | Ligne 7: | ||
| ====== Scripts Bash de Synchro ===== | ====== Scripts Bash de Synchro ===== | ||
| - | **from-local-to-web.sh**# | + | **from-local-to-web.sh** |
| + | <code bash> | ||
| + | # | ||
| # Encoding : UTF-8 | # Encoding : UTF-8 | ||
| # Send Gramps local db and media to distant Gramps Web | # Send Gramps local db and media to distant Gramps Web | ||
| Ligne 44: | Ligne 46: | ||
| **from-web-to-local.sh** | **from-web-to-local.sh** | ||
| <code bash> | <code bash> | ||
| + | # | ||
| + | # Encoding : UTF-8 | ||
| + | # Sychronise Gramps web to local db and media | ||
| + | # Gramps Tree id | ||
| + | tree_id="< | ||
| + | # Local directories base path | ||
| + | local_base_dir="/ | ||
| + | # Local Gramps Databases directory path | ||
| + | local_db_dir=" | ||
| + | local_media_dir=" | ||
| + | local_bkp_dir=" | ||
| + | |||
| + | dist_user="< | ||
| + | dist_ip="< | ||
| + | dist_base_dir=" | ||
| + | dist_db_dir=" | ||
| + | dist_media_dir=" | ||
| + | dry_run="" | ||
| + | |||
| + | while getopts d option | ||
| + | do | ||
| + | case " | ||
| + | in | ||
| + | d)dry_run=" | ||
| + | esac | ||
| + | done | ||
| + | |||
| + | echo " | ||
| + | tar -cjvf " | ||
| + | |||
| + | if ! [[ -f " | ||
| + | echo "Sync distant DB with local DB" | ||
| + | rsync -av --exclude .gitignore ${dist_user}@${dist_ip}: | ||
| + | rsync -av --checksum --exclude .gitignore ${dist_user}@${dist_ip}: | ||
| + | else | ||
| + | echo " | ||
| + | fi | ||
| </ | </ | ||