mirror of
				https://forge.chapril.org/tykayn/workflow
				synced 2025-10-09 17:02:47 +02:00 
			
		
		
		
	add backup strategy
This commit is contained in:
		
							parent
							
								
									1fb5c50757
								
							
						
					
					
						commit
						ed0166db29
					
				
					 16 changed files with 374 additions and 9 deletions
				
			
		
							
								
								
									
										0
									
								
								automatisation/ansible/ansible.cfg
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										0
									
								
								automatisation/ansible/ansible.cfg
									
										
									
									
									
										Normal file
									
								
							
							
								
								
									
										17
									
								
								automatisation/ansible/ansible_hosts
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										17
									
								
								automatisation/ansible/ansible_hosts
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,17 @@ | ||||||
|  | [webservers] | ||||||
|  | localhost | ||||||
|  | 
 | ||||||
|  | [riseup] | ||||||
|  | proxmox.coussinet.org | ||||||
|  | 
 | ||||||
|  | [not_yet_servers] | ||||||
|  | peertube.cipherbliss.com | ||||||
|  | mastodon.cipherbliss.com | ||||||
|  | www.cipherbliss.com | ||||||
|  | 
 | ||||||
|  | [linessland] | ||||||
|  | bbb.liness.org ansible_port=3910 ansible_user=tykayn | ||||||
|  | 
 | ||||||
|  | [faoland] | ||||||
|  | 192.168.1.2 | ||||||
|  | 192.168.1.15 | ||||||
							
								
								
									
										14
									
								
								automatisation/ansible/backup.yml
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										14
									
								
								automatisation/ansible/backup.yml
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,14 @@ | ||||||
|  | - name: installer des programmes de backup | ||||||
|  |   hosts: linessland | ||||||
|  |   become: yes | ||||||
|  |   become_user: root | ||||||
|  | #  vars: | ||||||
|  | #     server_name: localhost | ||||||
|  |   tasks: | ||||||
|  |     - name: ensure latest version of main tools for desktop is installed | ||||||
|  |       apt: | ||||||
|  |         state: present | ||||||
|  |         name: | ||||||
|  | #          - automysqlbackup | ||||||
|  | #          - autopostgresqlbackup | ||||||
|  |           - borgbackup | ||||||
|  | @ -0,0 +1,8 @@ | ||||||
|  | - name: cronjob de vérification des programmes installés pour l'utilisateur root | ||||||
|  |   hosts: localhost | ||||||
|  |   tasks: | ||||||
|  |     - name: "vérifier l'existence d'un cronjob pour l'utilisateur root pour le workdflow nextcloud" | ||||||
|  |       ansible.builtin.cron: | ||||||
|  |         name: "run nextcloud workflows of root for container tk_websites" | ||||||
|  |         minute: "*/30" | ||||||
|  |         job: "/bin/bash ~/ansible/cronjob_nextcloud.sh" | ||||||
							
								
								
									
										8
									
								
								automatisation/ansible/cronjob_workflow.yml
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										8
									
								
								automatisation/ansible/cronjob_workflow.yml
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,8 @@ | ||||||
|  | - name: cronjob pour le workflow nextcloud toutes les 5 minutes | ||||||
|  |   hosts: localhost | ||||||
|  |   tasks: | ||||||
|  |     - name: "vérifier l'existence d'un cronjob pour le workdflow nextcloud" | ||||||
|  |       ansible.builtin.cron: | ||||||
|  |         name: "run nextcloud workflows of tykayn" | ||||||
|  |         minute: "*/5" | ||||||
|  |         job: "/bin/bash ~/Nextcloud/ressources/workflow_nextcloud/cronjob_nextcloud.sh" | ||||||
							
								
								
									
										8
									
								
								automatisation/ansible/cronjob_workflow_root.yml
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										8
									
								
								automatisation/ansible/cronjob_workflow_root.yml
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,8 @@ | ||||||
|  | - name: cronjob de vérification des programmes installés pour l'utilisateur root | ||||||
|  |   hosts: localhost | ||||||
|  |   tasks: | ||||||
|  |     - name: "vérifier l'existence d'un cronjob pour l'utilisateur root pour le workdflow nextcloud" | ||||||
|  |       ansible.builtin.cron: | ||||||
|  |         name: "run nextcloud workflows of root" | ||||||
|  |         minute: "*/30" | ||||||
|  |         job: "/bin/bash ~/Nextcloud/ressources/workflow_nextcloud/cronjob_nextcloud.sh" | ||||||
							
								
								
									
										45
									
								
								automatisation/ansible/node_packages.yml
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										45
									
								
								automatisation/ansible/node_packages.yml
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,45 @@ | ||||||
|  | - name: "vérifier l'existence des paquets NPM pour le développement" | ||||||
|  |   hosts: localhost | ||||||
|  |   tasks: | ||||||
|  |     - name: "Angular CLI" | ||||||
|  |       community.general.npm: | ||||||
|  |         name: "@angular/cli" | ||||||
|  |         global: true | ||||||
|  | #    - name: "Vue CLI" | ||||||
|  | #      community.general.npm: | ||||||
|  | #        name: "@vue/cli" | ||||||
|  | #        global: true | ||||||
|  |     - name: "Encore" | ||||||
|  |       community.general.npm: | ||||||
|  |         name: "encore" | ||||||
|  |         global: true | ||||||
|  |     - name: "node version manager" | ||||||
|  |       community.general.npm: | ||||||
|  |         name: "nvm" | ||||||
|  |         global: true | ||||||
|  |         state: absent | ||||||
|  |     - name: "cypress test runner" | ||||||
|  |       community.general.npm: | ||||||
|  |         name: "cypress" | ||||||
|  |         global: true | ||||||
|  |     - name: "Nuxt cli nuxi" | ||||||
|  |       community.general.npm: | ||||||
|  |         name: "nuxi" | ||||||
|  |         global: true | ||||||
|  |     - name: "yarn" | ||||||
|  |       community.general.npm: | ||||||
|  |         name: "yarn" | ||||||
|  |         global: true | ||||||
|  | 
 | ||||||
|  |     - name: "eslint" | ||||||
|  |       community.general.npm: | ||||||
|  |         name: "eslint" | ||||||
|  |         global: true | ||||||
|  |     - name: "nodemon" | ||||||
|  |       community.general.npm: | ||||||
|  |         name: "nodemon" | ||||||
|  |         global: true | ||||||
|  |     - name: "serve" | ||||||
|  |       community.general.npm: | ||||||
|  |         name: "serve" | ||||||
|  |         global: true | ||||||
							
								
								
									
										38
									
								
								automatisation/ansible/pip_modules.yml
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										38
									
								
								automatisation/ansible/pip_modules.yml
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,38 @@ | ||||||
|  | # Install snaps | ||||||
|  | - name: installer des programmes avec python pip | ||||||
|  |   hosts: localhost | ||||||
|  |   become: true | ||||||
|  |   become_user: root | ||||||
|  |   vars: | ||||||
|  |     server_name: localhost | ||||||
|  |   tasks: | ||||||
|  |     - name: Install guessfilename | ||||||
|  |       ansible.builtin.pip: | ||||||
|  |         name: guessfilename | ||||||
|  |     - name: Install appendfilename | ||||||
|  |       ansible.builtin.pip: | ||||||
|  |         name: appendfilename | ||||||
|  |     - name: Install memacs | ||||||
|  |       ansible.builtin.pip: | ||||||
|  |         name: memacs | ||||||
|  |     - name: Install vosk | ||||||
|  |       ansible.builtin.pip: | ||||||
|  |         name: vosk | ||||||
|  |     - name: Install date2name | ||||||
|  |       ansible.builtin.pip: | ||||||
|  |         name: date2name | ||||||
|  |     - name: Install move2archive | ||||||
|  |       ansible.builtin.pip: | ||||||
|  |         name: move2archive | ||||||
|  |     - name: Install filetags | ||||||
|  |       ansible.builtin.pip: | ||||||
|  |         name: filetags | ||||||
|  |     - name: Install ical2orgpy | ||||||
|  |       ansible.builtin.pip: | ||||||
|  |         name: ical2orgpy | ||||||
|  |     - name: Install yt-dlp | ||||||
|  |       ansible.builtin.pip: | ||||||
|  |         name: yt-dlp | ||||||
|  |     - name: Install woob | ||||||
|  |       ansible.builtin.pip: | ||||||
|  |         name: woob | ||||||
							
								
								
									
										23
									
								
								automatisation/ansible/riseup_checks.yml
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										23
									
								
								automatisation/ansible/riseup_checks.yml
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,23 @@ | ||||||
|  | - name: vérifier les services de riseup | ||||||
|  |   hosts: localhost | ||||||
|  |   become: true | ||||||
|  |   become_user: root | ||||||
|  |   vars: | ||||||
|  |     server_name: localhost | ||||||
|  |   tasks: | ||||||
|  |     - name: Make sure there is no 'apache2' | ||||||
|  |       systemd: | ||||||
|  |         name: apache2 | ||||||
|  |         state: stopped | ||||||
|  |         enabled: no | ||||||
|  |       register: result_apache | ||||||
|  | 
 | ||||||
|  |     - name: Make sure 'nginx' is started | ||||||
|  |       systemd: | ||||||
|  |         name: nginx | ||||||
|  |         state: started | ||||||
|  |         enabled: yes | ||||||
|  |       register: result_nginx | ||||||
|  |     - name: Show result | ||||||
|  |       debug: | ||||||
|  |         msg: "{{ result_nginx }}" | ||||||
							
								
								
									
										57
									
								
								automatisation/ansible/server_tk_softwares.yml
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										57
									
								
								automatisation/ansible/server_tk_softwares.yml
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,57 @@ | ||||||
|  | - name: installer des programmes utiles avec apt | ||||||
|  |   hosts: localhost | ||||||
|  |   become: yes | ||||||
|  |   become_user: root | ||||||
|  |   vars: | ||||||
|  |      server_name: localhost | ||||||
|  |   tasks: | ||||||
|  |     - name: ensure latest version of main tools is installed on a headless computer | ||||||
|  |       apt: | ||||||
|  |         state: present | ||||||
|  |         name: | ||||||
|  |           - arp-scan | ||||||
|  |           - borgbackup | ||||||
|  |           - curl | ||||||
|  |           - docker | ||||||
|  |           - docker-compose | ||||||
|  |           - etckeeper | ||||||
|  |           - git | ||||||
|  |           - gnupg | ||||||
|  |           - jq | ||||||
|  |           - meld | ||||||
|  |           - nano | ||||||
|  |           - ncdu | ||||||
|  |           - nginx | ||||||
|  |           - restic | ||||||
|  |           - npm | ||||||
|  |           - pandoc | ||||||
|  |           - php | ||||||
|  |           - python3 | ||||||
|  |           - python3-pip | ||||||
|  |           - tig | ||||||
|  |           - zsh | ||||||
|  |          # - veracrypt | ||||||
|  |           - testdisk | ||||||
|  |           - texlive | ||||||
|  |           - rbenv | ||||||
|  |           - htop | ||||||
|  | #          - btop | ||||||
|  |           - python3-pip | ||||||
|  |           - python3-setuptools | ||||||
|  |           - autopostgresqlbackup | ||||||
|  |           - automysqlbackup | ||||||
|  |           - certbot | ||||||
|  |           - smartmontools | ||||||
|  |           - fail2ban | ||||||
|  |           - snapd | ||||||
|  |           - unattended-upgrades | ||||||
|  |           - php | ||||||
|  |           - php-fpm | ||||||
|  |           - php-xml | ||||||
|  |           - php-mysql | ||||||
|  |           - rsync | ||||||
|  |           - php-dom | ||||||
|  |           - php-curl | ||||||
|  |           - vrms | ||||||
|  |           - syncthing | ||||||
|  |           - sshfs | ||||||
							
								
								
									
										49
									
								
								automatisation/ansible/snaps.yml
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										49
									
								
								automatisation/ansible/snaps.yml
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,49 @@ | ||||||
|  | # Install snaps | ||||||
|  | - name: installer des programmes avec snap | ||||||
|  |   hosts: localhost | ||||||
|  |   become: true | ||||||
|  |   become_user: root | ||||||
|  |   vars: | ||||||
|  |     server_name: localhost | ||||||
|  |   tasks: | ||||||
|  |     - name: Install emacs with option --classic | ||||||
|  |       community.general.snap: | ||||||
|  |         name: | ||||||
|  |           - emacs | ||||||
|  |           - blender | ||||||
|  |           - rambox | ||||||
|  |         classic: true | ||||||
|  | #    - name: Install "blender" with option --classic | ||||||
|  | #      community.general.snap: | ||||||
|  | #        name: blender | ||||||
|  | #        classic: true | ||||||
|  | #    - name: Install "rambox" with option --classic | ||||||
|  | #      community.general.snap: | ||||||
|  | #        name: rambox | ||||||
|  | #        classic: true | ||||||
|  |     - name: Install fslint | ||||||
|  |       community.general.snap: | ||||||
|  |         name: fslint-unofficial | ||||||
|  | 
 | ||||||
|  |     - name: Install "tor-mkg20001" | ||||||
|  |       community.general.snap: | ||||||
|  |         name: tor-mkg20001 | ||||||
|  | 
 | ||||||
|  |     - name: Install "signal-desktop" | ||||||
|  |       community.general.snap: | ||||||
|  |         name: signal-desktop | ||||||
|  |     - name: Install "sqlitebrowser" | ||||||
|  |       community.general.snap: | ||||||
|  |         name: sqlitebrowser | ||||||
|  |     - name: Install "postman" | ||||||
|  |       community.general.snap: | ||||||
|  |         name: postman | ||||||
|  |     - name: Install "obs-studio" recording and screencasting | ||||||
|  |       community.general.snap: | ||||||
|  |         name: obs-studio | ||||||
|  |     - name: Install "gephi" data visualisation browser | ||||||
|  |       community.general.snap: | ||||||
|  |         name: gephi | ||||||
|  | #    - name: Install "czkawka" to search for duplicate files | ||||||
|  | #      community.general.snap: | ||||||
|  | #        name: czkawka | ||||||
							
								
								
									
										8
									
								
								automatisation/ansible/spaceship_cronjob_workflow.yml
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										8
									
								
								automatisation/ansible/spaceship_cronjob_workflow.yml
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,8 @@ | ||||||
|  | #- name: cronjob pour sync spaceship toutes les 1/4 d'heure | ||||||
|  | #  hosts: localhost | ||||||
|  | #  tasks: | ||||||
|  | #    - name: "vérifier l'existence d'un cronjob pour le workdflow nextcloud" | ||||||
|  | #      ansible.builtin.cron: | ||||||
|  | #        name: "run sync spaceship on spaceship computer, or whichever source of archives" | ||||||
|  | #        minute: "*/4" | ||||||
|  | #        job: "/bin/bash ~/Nextcloud/ressources/workflow_nextcloud/sync_spaceship.sh" | ||||||
							
								
								
									
										74
									
								
								automatisation/ansible/tk_softwares.yml
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										74
									
								
								automatisation/ansible/tk_softwares.yml
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,74 @@ | ||||||
|  | - name: installer des programmes utiles avec apt | ||||||
|  |   hosts: localhost | ||||||
|  |   become: yes | ||||||
|  |   become_user: root | ||||||
|  |   vars: | ||||||
|  |      server_name: localhost | ||||||
|  |   tasks: | ||||||
|  |     - name: ensure latest version of main tools for desktop is installed | ||||||
|  |       apt: | ||||||
|  |         state: present | ||||||
|  |         name: | ||||||
|  |           - arp-scan | ||||||
|  |           - audacity | ||||||
|  |           - automysqlbackup | ||||||
|  | #          - autopostgresqlbackup | ||||||
|  |           - baobab | ||||||
|  |           - borgbackup | ||||||
|  | #          - btop | ||||||
|  |           - certbot | ||||||
|  |           - curl | ||||||
|  |           - docker | ||||||
|  |           - docker-compose | ||||||
|  |           - dolphin | ||||||
|  |           - etckeeper | ||||||
|  |           - fail2ban | ||||||
|  |           - gajim | ||||||
|  |           - geeqie | ||||||
|  |           - gimp | ||||||
|  |           - git | ||||||
|  |           - gnupg | ||||||
|  |           - gpa | ||||||
|  |           - grsync | ||||||
|  |           - htop | ||||||
|  |           - jq | ||||||
|  |           - kdenlive | ||||||
|  |           - keepassxc | ||||||
|  |           - klavaro | ||||||
|  |           - konsole | ||||||
|  |           - krita | ||||||
|  |           - krita-l10n | ||||||
|  |           - meld | ||||||
|  |           - nano | ||||||
|  |           - ncdu | ||||||
|  |           - nginx | ||||||
|  |           - npm | ||||||
|  |           - pandoc | ||||||
|  |           - rbenv | ||||||
|  |           - php | ||||||
|  |           - php | ||||||
|  |           - php-curl | ||||||
|  | #          - php-dom | ||||||
|  |           - php-fpm | ||||||
|  |           - php-mysql | ||||||
|  |           - php-xml | ||||||
|  |           - python3 | ||||||
|  |           - python3-pip | ||||||
|  |           - python3-pip | ||||||
|  |           - python3-setuptools | ||||||
|  |           - restic | ||||||
|  |           - rsync | ||||||
|  |           - smartmontools | ||||||
|  |           - snapd | ||||||
|  |           - terminator | ||||||
|  |           - testdisk | ||||||
|  |           - texlive-full | ||||||
|  |           - thunar | ||||||
|  |           - tig | ||||||
|  |           - transmission | ||||||
|  |           - ufw | ||||||
|  |           - unattended-upgrades | ||||||
|  | #          - veracrypt | ||||||
|  |           - vrms | ||||||
|  |           - vlc | ||||||
|  |           - zsh | ||||||
							
								
								
									
										5
									
								
								automatisation/ansible/websites_container.yml
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										5
									
								
								automatisation/ansible/websites_container.yml
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,5 @@ | ||||||
|  | # vérifier que les services tournent | ||||||
|  | - name: Start service nginx, if not started | ||||||
|  |   ansible.builtin.service: | ||||||
|  |     name: nginx | ||||||
|  |     state: started | ||||||
|  | @ -17,15 +17,15 @@ fi | ||||||
| ansible-galaxy install coglinev3.veracrypt | ansible-galaxy install coglinev3.veracrypt | ||||||
| 
 | 
 | ||||||
| echo "vérification et installation des paquets requis" | echo "vérification et installation des paquets requis" | ||||||
| sudo ansible-playbook "/home/tykayn/Nextcloud/ressources/workflow_nextcloud/ansible/tk_softwares.yml" | sudo ansible-playbook "$WORKFLOW_PATH/automatisation/ansible/tk_softwares.yml" | ||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
| ansible-playbook "/home/tykayn/Nextcloud/ressources/workflow_nextcloud/ansible/pip_modules.yml" | ansible-playbook "$WORKFLOW_PATH/automatisation/ansible/pip_modules.yml" | ||||||
| sudo ansible-playbook "/home/tykayn/Nextcloud/ressources/workflow_nextcloud/ansible/snaps.yml" | sudo ansible-playbook "$WORKFLOW_PATH/automatisation/ansible/snaps.yml" | ||||||
| ansible-playbook "/home/tykayn/Nextcloud/ressources/workflow_nextcloud/ansible/node_packages.yml" | ansible-playbook "$WORKFLOW_PATH/automatisation/ansible/node_packages.yml" | ||||||
| 
 | 
 | ||||||
| ansible-playbook "/home/tykayn/Nextcloud/ressources/workflow_nextcloud/ansible/cronjob_workflow.yml" | ansible-playbook "$WORKFLOW_PATH/automatisation/ansible/cronjob_workflow.yml" | ||||||
| sudo ansible-playbook "/home/tykayn/Nextcloud/ressources/workflow_nextcloud/ansible/cronjob_workflow_root.yml" | sudo ansible-playbook "$WORKFLOW_PATH/automatisation/ansible/cronjob_workflow_root.yml" | ||||||
| 
 | 
 | ||||||
| sudo apt autoremove -y | sudo apt autoremove -y | ||||||
| 
 | 
 | ||||||
|  | @ -42,14 +42,15 @@ if ! hash nvm > /dev/null; then | ||||||
|  wget -qO- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.1/install.sh | bash |  wget -qO- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.1/install.sh | bash | ||||||
| fi | fi | ||||||
| 
 | 
 | ||||||
| # yarn |  | ||||||
| corepack enable |  | ||||||
| #npm i -g yarn |  | ||||||
| 
 | 
 | ||||||
| nvm install $node_version_expected | nvm install $node_version_expected | ||||||
| nvm alias default $node_version_expected | nvm alias default $node_version_expected | ||||||
| nvm alias global $node_version_expected | nvm alias global $node_version_expected | ||||||
| 
 | 
 | ||||||
|  | # yarn | ||||||
|  | corepack enable | ||||||
|  | npm i -g pnpm | ||||||
|  | 
 | ||||||
|  echo "nvm installé, version des outils js:" |  echo "nvm installé, version des outils js:" | ||||||
| nvm --version | nvm --version | ||||||
| node --version | node --version | ||||||
|  | @ -137,3 +138,6 @@ fi | ||||||
| bash "$WORKFLOW_PATH"/files_management/install.sh | bash "$WORKFLOW_PATH"/files_management/install.sh | ||||||
| bash "$WORKFLOW_PATH"/install/git_config_glob.sh | bash "$WORKFLOW_PATH"/install/git_config_glob.sh | ||||||
| bash "$WORKFLOW_PATH"/refresh_from_current_assets.sh | bash "$WORKFLOW_PATH"/refresh_from_current_assets.sh | ||||||
|  | 
 | ||||||
|  | sudo apt update -y | ||||||
|  | sudo apt upgrade -y | ||||||
							
								
								
									
										7
									
								
								knowledge/backup_strategy.md
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										7
									
								
								knowledge/backup_strategy.md
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,7 @@ | ||||||
|  | # Backup strategy | ||||||
|  | 
 | ||||||
|  | Localisez où se trouvent les données que vous souhaitez conserver automatiquement et établissez un plan de récupération. | ||||||
|  | 
 | ||||||
|  | ## Liste des données | ||||||
|  | ## Liste des supports | ||||||
|  | ## Moyens de restauration | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Tykayn
						Tykayn