update of assets from refresh script

This commit is contained in:
Tykayn 2023-07-17 22:19:25 +02:00 committed by tykayn
parent aaf00bd4ba
commit ce5d0880ae
5 changed files with 187 additions and 109 deletions

View File

@ -248,8 +248,8 @@
"TORELAUNCH(r@/!)" "TODELEGATE(-!)" "DELEGATED(d!)" "|" "DONE(1!)"))) "TORELAUNCH(r@/!)" "TODELEGATE(-!)" "DELEGATED(d!)" "|" "DONE(1!)")))
#+end_src #+end_src
** Vue d'agenda Orgmode ** Vue d'agenda Orgmode custom
Présentation personnalisée d'agenda, "custom views". Présentation personnalisée d'agenda, "custom views".
#+begin_src emacs-lisp #+begin_src emacs-lisp
@ -310,13 +310,13 @@
("x" "Unscheduled, untagged tasks" tags-todo "-someday-TODO=\"SOMEDAY\"-TODO=\"DELEGATED\"-TODO=\"WAITING\"-project-cooking-routine-evilplans-computer-writing-phone-sewing-home-errands-shopping" ("x" "Unscheduled, untagged tasks" tags-todo "-someday-TODO=\"SOMEDAY\"-TODO=\"DELEGATED\"-TODO=\"WAITING\"-project-cooking-routine-evilplans-computer-writing-phone-sewing-home-errands-shopping"
((org-agenda-skip-function 'my-org-agenda-skip-scheduled) ((org-agenda-skip-function 'my-org-agenda-skip-scheduled)
(org-agenda-view-columns-initially nil) (org-agenda-view-columns-initially nil)
(org-tags-exclude-from-inheritance '("project")) ;; (org-tags-exclude-from-inheritance '("project"))
(org-agenda-overriding-header "Unscheduled TODO entries: ") (org-agenda-overriding-header "Tâches TODO sans schedule: ")
(org-columns-default-format "%50ITEM %TODO %3PRIORITY %Effort{:} %TAGS") (org-columns-default-format "%50ITEM %TODO %3PRIORITY %Effort{:} %TAGS")
(org-agenda-sorting-strategy '(todo-state-up priority-down effort-up tag-up category-keep)))) (org-agenda-sorting-strategy '(todo-state-up priority-down effort-up tag-up category-keep))))
("b" "Boulot" tags-todo "+boulot") ("b" "Boulot" tags-todo "+boulot")
("c" "Cancelled" tags-todo "CANCELLED") ("c" "Cancelled" tags-todo "+TODO=\"CANCELLED\"")
("D" "Done tasks" tags-todo "DONE") ("D" "Done tasks" tags-todo "DONE")
("i" "Inbox to sort" tags "+inbox") ("i" "Inbox to sort" tags "+inbox")
("g". "GTD Searches") ;; category searches ("g". "GTD Searches") ;; category searches

View File

@ -7,6 +7,11 @@
source ~/Nextcloud/ressources/workflow_nextcloud/workflow_variables.sh source ~/Nextcloud/ressources/workflow_nextcloud/workflow_variables.sh
# récupérer les notes du mobile et les stocker dans l'incoming inbox orgmode # récupérer les notes du mobile et les stocker dans l'incoming inbox orgmode
bash $WORKFLOW_PATH/archive_from_nextcloud.sh
bash $WORKFLOW_PATH/update_calendar_tkwulfi.sh bash $WORKFLOW_PATH/update_calendar_tkwulfi.sh
bash $WORKFLOW_PATH/get_nextcloud_notes_todo.sh bash $WORKFLOW_PATH/get_nextcloud_notes_todo.sh
bash $WORKFLOW_PATH/backup_nextcloud_in_user_home.sh bash $WORKFLOW_PATH/backup_nextcloud_in_user_home.sh
bash $WORKFLOW_PATH/git_auto_commit_workflow_folder.sh
upPhotosADispatcher

View File

@ -18,19 +18,21 @@ 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 $WORKFLOW_PATH/ansible/tk_softwares.yml sudo ansible-playbook "/home/tykayn/Nextcloud/ressources/workflow_nextcloud/ansible/tk_softwares.yml"
ansible-playbook $WORKFLOW_PATH/ansible/pip_modules.yml ansible-playbook "/home/tykayn/Nextcloud/ressources/workflow_nextcloud/ansible/pip_modules.yml"
sudo ansible-playbook $WORKFLOW_PATH/ansible/snaps.yml sudo ansible-playbook "/home/tykayn/Nextcloud/ressources/workflow_nextcloud/ansible/snaps.yml"
ansible-playbook $WORKFLOW_PATH/ansible/node_packages.yml ansible-playbook "/home/tykayn/Nextcloud/ressources/workflow_nextcloud/ansible/node_packages.yml"
ansible-playbook $WORKFLOW_PATH/ansible/cronjob_workflow.yml ansible-playbook "/home/tykayn/Nextcloud/ressources/workflow_nextcloud/ansible/cronjob_workflow.yml"
sudo ansible-playbook $WORKFLOW_PATH/ansible/cronjob_workflow_root.yml sudo ansible-playbook "/home/tykayn/Nextcloud/ressources/workflow_nextcloud/ansible/cronjob_workflow_root.yml"
sudo apt autoremove -y sudo apt autoremove -y
############ install developping tools ############ install developping tools
# nvm node version manager # nvm node version manager
if ! hash nvm > /dev/null; then if ! hash nvm > /dev/null; then
echo "installation de nvm" echo "installation de nvm"
@ -124,6 +126,15 @@ cp "$WORKFLOW_PATH"/install/.zshrc ~/
cp "$WORKFLOW_PATH"/install/.bash_aliases ~/ cp "$WORKFLOW_PATH"/install/.bash_aliases ~/
cp "$WORKFLOW_PATH"/install/.bashrc ~/ cp "$WORKFLOW_PATH"/install/.bashrc ~/
if ! -d ~/.oh-my-zsh; then
echo "installer oh my zsh"
cd
sudo apt install zsh
sh -c "$(wget https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh -O -)"
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

View File

@ -16,27 +16,32 @@
# #
# ----------------- configs ----------------- # ----------------- configs -----------------
# functions_sync.sh définit les constantes utiles # functions_sync.sh définit les constantes utiles
# le borg backup fait 1.4 To
# le stockage syncable fait
source ~/Nextcloud/ressources/workflow_nextcloud/workflow_variables.sh
source ~/Nextcloud/ressources/workflow_nextcloud/install/functions_sync.sh
source ~/Nextcloud/ressources/workflow_nextcloud/install/functions_tk.sh
LOGIN_NAS="tykayn@192.168.1.15" LOGIN_NAS="tykayn@192.168.1.15"
. ~/Nextcloud/ressources/workflow_nextcloud/workflow_variables.sh
. ~/Nextcloud/ressources/workflow_nextcloud/install/functions_tk.sh
. ~/Nextcloud/ressources/workflow_nextcloud/install/functions_sync.sh . ~/Nextcloud/ressources/workflow_nextcloud/install/functions_sync.sh
logDate ' start backup script from sync_spaceship script' logDate ' start backup script from sync_spaceship script'
logDate "${pwd} sync_spaceship.sh" logDate "${pwd} sync_spaceship.sh"
logDate ' stop all rsync jobs' #logDate ' stop all rsync jobs'
killall rsync; #killall rsync;
# ------------------ # ------------------
logDate ' copie du script actuel' logDate ' copie de config actuelle'
cp ~/.bash_aliases $ARCHIVE_SYNCABLE/archivage/__scripts_syncro cp ~/.bash_aliases $WORKFLOW_PATH/install/
cp ~/.emacs $ARCHIVE_SYNCABLE/archivage/__scripts_syncro cp ~/.emacs $WORKFLOW_PATH/install/
cp ~/.gitconfig $WORKFLOW_PATH/install/
cp ~/Nextcloud/ressources/workflow_nextcloud/sync_spaceship.sh $ARCHIVE_SYNCABLE/archivage/__scripts_syncro
#cp ~/.bash_aliases ~/Nextcloud/ressources/workflow_nextcloud/install
#cp ~/.emacs ~/Nextcloud/ressources/workflow_nextcloud/install
echo ' ' >> $LOG_FILE_BACKUP_DATES echo ' ' >> $LOG_FILE_BACKUP_DATES
echo "### ${today} start backup script from sync_spaceship script" >> $LOG_FILE_BACKUP_DATES echo "### ${today} start backup script from sync_spaceship script" >> $LOG_FILE_BACKUP_DATES
@ -46,43 +51,28 @@ echo "### ${today} list of debian apt packages saved in borg_archives list_of_de
# save a list of apt packages # save a list of apt packages
# to restore it: # to restore it:
# dpkg --set-selections < list_of_debian_apt_packages.txt # dpkg --set-selections < list_of_debian_apt_packages.txt
dpkg --get-selections>~/list_of_debian_apt_packages.txt dpkg --get-selections > $WORKFLOW_PATH/install/list_of_debian_apt_packages.txt
# back pictures to ARCHIVE_SYNCABLE #bash archive_from_nextcloud.sh
logDate 'copy of Nextcloud InstantUpload photos'
mv ~/Nextcloud/InstantUpload/Camera/* "$ARCHIVE_SYNCABLE/photos/a dispatcher" | tee -a $LOG_FILE_BACKUP 2>&1
mv ~/Nextcloud/inbox/instantUpload/* "$ARCHIVE_SYNCABLE/photos/a dispatcher" | tee -a $LOG_FILE_BACKUP 2>&1
mv ~/Nextcloud/inbox/instantUpload "$ARCHIVE_SYNCABLE/photos/a dispatcher" | tee -a $LOG_FILE_BACKUP 2>&1
echo ' ' >> $LOG_FILE_BACKUP_DATES
echo "### ${today} medias in $ARCHIVE_SYNCABLE/photos/$CURRENT_YEAR" >> $LOG_FILE_BACKUP_DATES
ls -l "$ARCHIVE_SYNCABLE/photos/$CURRENT_YEAR" | wc -l | tee -a $LOG_FILE_BACKUP 2>&1
logDate ' Screenshots et Download'
mv ~/Nextcloud/inbox/InstantUpload/Screenshots/* "$ARCHIVE_SYNCABLE/photos/screenshots" | tee -a $LOG_FILE_BACKUP 2>&1
mv ~/Nextcloud/inbox/InstantUpload/Download/* "$ARCHIVE_SYNCABLE/BAZAR" | tee -a $LOG_FILE_BACKUP 2>&1
logDate 'update local nextcloud to stockage syncable';
rsync -avhWP --perms --inplace --delete-before ~/Nextcloud/* $ARCHIVE_SYNCABLE/archivage/clouds/Nextcloud | tee -a $LOG_FILE_BACKUP 2>&1
# --------- copier la home dans les archives ------------ # --------- copier la home dans les archives ------------
logDate 'update home backup'; logDate 'update home backup';
rsync -avhWP --inplace --delete-before ~/* /home/poule/encrypted/stockage-syncable/archivage/home "${exclude_opts[@]}" --exclude 'Nextcloud' --exclude 'www' --exclude 'VirtualBox VMs' | tee -a $LOG_FILE_BACKUP 2>&1 rsync -avhWP --inplace --delete-before ~/* /home/poule/encrypted/stockage-syncable/archivage/home "${exclude_opts[@]}" \
--exclude 'Nextcloud' --exclude 'www' --exclude 'VirtualBox VMs' --exclude 'snaps' | tee -a $LOG_FILE_BACKUP 2>&1
# --------- sauver les dossiers de développement dans l'archive stockage syncable sans supprimer les projets présents -------- # # --------- sauver les dossiers de développement dans l'archive stockage syncable sans supprimer les projets présents -------- #
logDate 'WWW et HTML sauver les dossiers de développement'; #logDate 'WWW et HTML sauver les dossiers de développement';
rsync -avP /home/tykayn/www/* /home/poule/encrypted/stockage-syncable/www/development/html "${exclude_opts[@]}" #rsync -avP /home/tykayn/www/* /home/poule/encrypted/stockage-syncable/www/development/html "${exclude_opts[@]}"
rsync -avP /var/www/html/* /home/poule/encrypted/stockage-syncable/www/development/html "${exclude_opts[@]}" #rsync -avP /var/www/html/* /home/poule/encrypted/stockage-syncable/www/development/html "${exclude_opts[@]}"
# ---------------------------------------------------------------------- # ----------------------------------------------------------------------
# --------- disques -------- # # --------- disques -------- #
# - blue 4To (squatt à lyon) # - blue 4To (squatt à thalmont)
# - brossadent 4To # - brossadent 4To
# - chaton 5To (usb boitier) # - chaton 5To (usb boitier)
# - lilia 4To # - lilia 4To
@ -103,12 +93,30 @@ echo "le log de backup se situe dans : $LOG_FILE_BACKUP_DATES"
# --------- mettre à jour les borg backup des serveurs distants -------- # # --------- mettre à jour les borg backup des serveurs distants -------- #
# getWebServersBorg; # getWebServersBorg;
# --- raspberry pi ---------- #
logDate 'update local backup de domoticz vers stockage-syncable/www/backup/domoticz/synced';
rsync -avhWP pi@192.168.1.2:/home/pi /home/poule/encrypted/stockage-syncable/www/backup/domoticz/synced --delete-before --inplace
# --- maj borg de stockage syncable ---------- # # --- maj borg de stockage syncable ---------- #
upBorg; #upBorg;
#killall borg
logDate "### --------- SPACESHIP | creating borg archive at $SPACESHIP_NEW_BORG_REPO"
rm -rf ~/.cache/borg/150867528afd85114c8aba98af201a7ad8cf01869c507a87c025d2f8701040a9/lock.exclusive
rm -rf ~/.cache/borg/68b9103c6f35bfd198552cb197f149b1d05309d28ce4429f2bec8df01b453660/lock.exclusive
rm -rf ~/.cache/borg/b822ee0c0c5c7a181a3b3b7cefc6eb4f3baf9965f30bfca364c2ff92f9962de4/lock.exclusive
rm -rf ~/.cache/borg/d1c0552f96686f6d631068bc8bf0c19f2a7ff80f956dc36b0441f3d8aac78a36/lock.exclusive
# rm -rf SPACESHIP_NEW_BORG_REPO/lock.exclusive
borg create encrypted_spaceship_{now} $ARCHIVE_SYNCABLE \
/home/poule/encrypted/installateurs/installateurs_pour_ventoy \
"${exclude_opts[@]}" --progress --verbose --stats --compression zstd,9 \
| tee -a $LOG_FILE_BACKUP 2>&1
echo " " | tee -a $LOG_FILE_BACKUP 2>&1
logDate "### --------- ${today} | SPACESHIP | pruning old archives" | tee -a $LOG_FILE_BACKUP 2>&1
# nettoyage tk_backup
borg prune -v --list --stats --keep-daily=8 --keep-weekly=6 --keep-monthly=3 --keep-yearly=2 | tee -a $LOG_FILE_BACKUP 2>&1
logDate "### --------- pruning done"
# --------- disques avec beaucoup de place -------- # # --------- disques avec beaucoup de place -------- #
@ -121,32 +129,43 @@ upBorg;
#syncToBigDiskName blue #syncToBigDiskName blue
# --------- disques non chiffrés contenant uniquement les archives borg -------- # # --------- disques non chiffrés contenant uniquement les archives borg -------- #
# louisbraille contient l'ancienne organisation de stockage syncable
clearDiskSyncBorg kungfu # ne laisser de borg backup land 4to que dans un seul disque
clearDiskSyncBorg brossadent
clearDiskSyncBorg moonmoon rm -rf /media/tykayn/brossadent/borg_archives/backup_land4to
clearDiskSyncBorg chaton rm -rf /media/tykayn/moonmoon/borg_archives/backup_land4to
clearDiskSyncBorg rugged #rm -rf /media/tykayn/louisbraille/borg_archives/backup_land4to
clearDiskSyncBorg louisbraille rm -rf /media/tykayn/rugged/borg_archives/backup_land4to
clearDiskSyncBorg lilia rm -rf /media/tykayn/chaton/borg_archives/backup_land4to
clearDiskSyncBorg blue rm -rf /media/tykayn/lilia/borg_archives/backup_land4to
rm -rf /media/tykayn/blue/borg_archives/backup_land4to
syncToBigDiskName brossadent
syncToBigDiskName moonmoon
syncToBigDiskName louisbraille
syncToBigDiskName rugged
# syncToBigDiskName chaton # ce disque n'est pas chiffré, il sert à partager des médias et à voyager à liness
syncToBigDiskName lilia
syncToBigDiskName blue
clearDiskSyncBorgServer brossadent
clearDiskSyncBorgServer moonmoon
clearDiskSyncBorgServer louisbraille
clearDiskSyncBorgServer rugged
clearDiskSyncBorgServer chaton
clearDiskSyncBorgServer lilia
clearDiskSyncBorgServer blue
rsync -avP --delete-before $SPACESHIP_NEW_BORG_REPO/* /media/tykayn/Taiga/borg2
# --------- disques de petite taille -------- # # --------- disques de petite taille -------- #
# ne peuvent prendre que le stockage syncable # ne peuvent prendre que le stockage syncable
# ----------- small disks --------------
# syncro vers Taiga de borg # ----------- small disks --------------
FILE=/media/$USER/Taiga
if test -d "$FILE"; then
echo "### $FILE , Taiga exists." >> $LOG_FILE_BACKUP_DATES
logDate 'Taiga disk monté - sync borg backup';
# rsync -avhWP /home/poule/encrypted/stockage-syncable/* /media/$USER/$diskName/encrypted/stockage-syncable --perms --delete-before --inplace "${exclude_opts[@]}"
rsync -avhWP /home/poule/borg_archives/backup_land4to/* /media/tykayn/Taiga/backup_land4to --delete-before --inplace
else
echo 'Taiga disk NON monté '; >> $LOG_FILE_BACKUP_DATES
fi
# --------- autres pool ZFS -------- # # --------- autres pool ZFS -------- #
syncfatland; #syncfatland;
@ -156,47 +175,52 @@ syncfatland;
# ----------------- sync to NAS ----------------- # ----------------- sync to NAS -----------------
# à destination du NAS, les borg backups perso et de serveurs # à destination du NAS, les borg backups perso et de serveurs
logDate ' à destination du NAS: backup_land4to'; # logDate ' à destination du NAS: backup_land4to';
rsync -avhWP /home/poule/borg_archives/backup_land4to/* $LOGIN_NAS:/var/services/homes/tykayn/borg_archives/backup_land4to --delete-before --inplace --perms # #rsync -avhWP /home/poule/borg_archives/backup_land4to/* $LOGIN_NAS:/var/services/homes/tykayn/borg_archives/backup_land4to --delete-before --inplace --perms
rsync -avhWP /home/poule/cryptomator/* $LOGIN_NAS:/volume1/bidules_partagés/cryptomator --delete-before --inplace --perms # #rsync -avhWP /home/poule/cryptomator/* $LOGIN_NAS:/volume1/bidules_partagés/cryptomator --delete-before --inplace --perms
logDate ' à destination du NAS: production-servers-backup'; # logDate ' à destination du NAS: production-servers-backup';
#rsync -avhWP /home/poule/borg_archives/production-servers-backup/* $LOGIN_NAS:/var/services/homes/tykayn/borg_archives/production-servers-backup --delete-before --inplace --perms --exclude="@eaDir" "${exclude_opts[@]}" # #rsync -avhWP /home/poule/borg_archives/production-servers-backup/* $LOGIN_NAS:/var/services/homes/tykayn/borg_archives/production-servers-backup --delete-before --inplace --perms --exclude="@eaDir" "${exclude_opts[@]}"
logDate ' à destination du NAS: vidéos DL'; # logDate ' à destination du NAS: vidéos DL';
#rsync -avhWP /home/poule/videos/DOCU-CONF-YOUTUBE/* $LOGIN_NAS:/volume1/bidules_partagés/videos/DOCU-CONF-YOUTUBE --delete-before --inplace --perms # #rsync -avhWP /home/poule/videos/DOCU-CONF-YOUTUBE/* $LOGIN_NAS:/volume1/bidules_partagés/videos/DOCU-CONF-YOUTUBE --delete-before --inplace --perms
logDate ' à destination du NAS: vidéos'; # # logDate ' à destination du NAS: vidéos';
#rsync -avhWP /home/poule/videos/* $LOGIN_NAS:/volume1/bidules_partagés/videos --delete-before --inplace --perms # #rsync -avhWP /home/poule/videos/* $LOGIN_NAS:/volume1/bidules_partagés/videos --delete-before --inplace --perms
logDate ' à destination du NAS: music'; # logDate ' à destination du NAS: music';
#rsync -avhWP /home/poule/music $LOGIN_NAS:/volume1/music --delete-before --inplace --perms # #rsync -avhWP /home/poule/music $LOGIN_NAS:/volume1/music --delete-before --inplace --perms
# en provenance du NAS ----- les bidules partagés # # en provenance du NAS ----- les bidules partagés
logDate 'en provenance du NAS: bidules_partagés Documents administratifs'; # logDate 'en provenance du NAS: bidules_partagés Documents administratifs';
#rsync -avhWP $LOGIN_NAS:/volume1/bidules_partagés/Documents\\\ administratifs /home/poule/encrypted/bidules_partagés_backup --delete-before --inplace --perms "${exclude_opts[@]}" # #rsync -avhWP $LOGIN_NAS:/volume1/bidules_partagés/Documents\\\ administratifs /home/poule/encrypted/bidules_partagés_backup --delete-before --inplace --perms "${exclude_opts[@]}"
logDate 'en provenance du NAS: bidules_partagés Briis'; # logDate 'en provenance du NAS: bidules_partagés Briis';
#rsync -avhWP $LOGIN_NAS:/volume1/bidules_partagés/Briis /home/poule/encrypted/bidules_partagés_backup --delete-before --inplace --perms "${exclude_opts[@]}" # #rsync -avhWP $LOGIN_NAS:/volume1/bidules_partagés/Briis /home/poule/encrypted/bidules_partagés_backup --delete-before --inplace --perms "${exclude_opts[@]}"
logDate 'en provenance du NAS: bidules_partagés Mariage'; # logDate 'en provenance du NAS: bidules_partagés Mariage';
#rsync -avhWP $LOGIN_NAS:/volume1/bidules_partagés/Mariage /home/poule/encrypted/bidules_partagés_backup --delete-before --inplace --perms "${exclude_opts[@]}" # #rsync -avhWP $LOGIN_NAS:/volume1/bidules_partagés/Mariage /home/poule/encrypted/bidules_partagés_backup --delete-before --inplace --perms "${exclude_opts[@]}"
logDate 'en provenance du NAS: bidules_partagés wulfila_home sans backups ordi'; # logDate 'en provenance du NAS: bidules_partagés wulfila_home sans backups ordi';
#rsync -avhWP $LOGIN_NAS:/volume1/bidules_partagés/wulfila_home /home/poule/encrypted/other_people_content --inplace --exclude=TK-LAND --exclude=musique_tykayn --exclude=windows_backup_laptop_claire --delete-before --inplace --perms "${exclude_opts[@]}" # #rsync -avhWP $LOGIN_NAS:/volume1/bidules_partagés/wulfila_home /home/poule/encrypted/other_people_content --inplace --exclude=TK-LAND --exclude=musique_tykayn --exclude=windows_backup_laptop_claire --delete-before --inplace --perms "${exclude_opts[@]}"
logDate 'en provenance du NAS: fait'; # logDate 'en provenance du NAS: fait';
logDate ' sauver les textes Org' #logDate ' sauver les textes Org'
cd ~/Nextcloud/textes/orgmode && git add . --all && git commit -m "update orgmode files" && cd - #cd ~/Nextcloud/textes/orgmode && git add . --all && git commit -m "update orgmode files" && cd -
echo "### ${today} end" >> $LOG_FILE_BACKUP_DATES echo "### ${today} end" >> $LOG_FILE_BACKUP_DATES
date -ud "@$SECONDS" | tee -a $LOG_FILE_BACKUP 2>&1 date -ud "@$SECONDS" | tee -a $LOG_FILE_BACKUP 2>&1
echo "voir les logs: gedit $LOG_FILE_BACKUP" echo "voir les logs: gedit $LOG_FILE_BACKUP"
echo "voir les logs des sections par dates: gedit $LOG_FILE_BACKUP_DATES" echo "voir les logs des sections par dates: gedit $LOG_FILE_BACKUP_DATES"
echo " " | tee -a $LOG_FILE_BACKUP 2>&1 echo " " | tee -a $LOG_FILE_BACKUP 2>&1
echo "taille du BAZAR: $ARCHIVE_SYNCABLE/BAZAR " | tee -a $LOG_FILE_BACKUP 2>&1 #echo "taille du BAZAR: $ARCHIVE_SYNCABLE/BAZAR " | tee -a $LOG_FILE_BACKUP 2>&1
du -sch $ARCHIVE_SYNCABLE/BAZAR | tee -a $LOG_FILE_BACKUP 2>&1 #du -sch $ARCHIVE_SYNCABLE/BAZAR | tee -a $LOG_FILE_BACKUP 2>&1
# --- raspberry pi ---------- #
# logDate 'update local backup de domoticz vers stockage-syncable/www/backup/domoticz/synced';
# rsync -avhWP pi@192.168.1.2:/home/pi /home/poule/encrypted/stockage-syncable/www/backup/domoticz/synced --delete-before --inplace
date -ud "@$SECONDS" | tee -a $LOG_FILE_BACKUP_DATES 2>&1 date -ud "@$SECONDS" | tee -a $LOG_FILE_BACKUP_DATES 2>&1
echo " " | tee -a $LOG_FILE_BACKUP 2>&1 echo " " | tee -a $LOG_FILE_BACKUP 2>&1
echo " " | tee -a $LOG_FILE_BACKUP 2>&1 echo " ---------------------------- " | tee -a $LOG_FILE_BACKUP 2>&1
logDate 'fin de sync_spaceship.sh'; logDate 'fin de sync_spaceship.sh';

View File

@ -24,22 +24,60 @@ export HOME_OF_SCRIPTS=$www_folder/scripts
export stockage_syncable_folder=/home/poule/encrypted/stockage-syncable export stockage_syncable_folder=/home/poule/encrypted/stockage-syncable
# dossier où stocker les projets de dev # dossier où stocker les projets de dev
export www_folder=$HOME/areas/www export www_folder=$stockage_syncable_folder/www/development/html/
export node_version_expected=16 export node_version_expected=20
export today=`date` # to log current time export today=`date` # to log current time
export ARCHIVE_SYNCABLE=$stockage_syncable_folder # place where we have our things sorted, other than home export ARCHIVE_SYNCABLE=$stockage_syncable_folder # place where we have our things sorted, other than home
export BORG_PASSCOMMAND="cat $ARCHIVE_SYNCABLE/.tk-borg-passphrase-light" # get the borg repo pass export BORG_PASSCOMMAND="cat $ARCHIVE_SYNCABLE/.tk-borg-passphrase-light" # get the borg repo pass
export a_dispatcher="$ARCHIVE_SYNCABLE/photos/a_dispatcher" # dossier où sont stockées les photos en provenance du smartphone
export PHOTOS_TO_DISPATCH="$a_dispatcher"
export PHOTOS_FOLDER="$ARCHIVE_SYNCABLE/photos/"
export SPACESHIP_BORG_REPO="/home/poule/borg_archives/backup_land4to" export SPACESHIP_BORG_REPO="/home/poule/borg_archives/backup_land4to"
export SPACESHIP_NEW_BORG_REPO="/home/poule/borg_archives/borg2"
export BORG_REPO=$SPACESHIP_NEW_BORG_REPO
export LOG_FILE_BACKUP="$ARCHIVE_SYNCABLE/www/backup/log_backup.log" export LOG_FILE_BACKUP="$ARCHIVE_SYNCABLE/www/backup/log_backup.log"
# log dates of execution of the script # log dates of execution of the script
export LOG_FILE_BACKUP_DATES="$ARCHIVE_SYNCABLE/www/backup/summary_log_backup.log" export LOG_FILE_BACKUP_DATES="$ARCHIVE_SYNCABLE/www/backup/summary_log_backup.log"
export main_archive_source_sftop_spaceship="/mnt/spaceship_poule" export main_archive_source_sftop_spaceship="/mnt/spaceship_poule"
export IP_DU_NAS="/mnt/spaceship_poule" export IP_DU_NAS="192.168.1.15"
export MOUNT_FOLDER_DU_NAS="/mnt/spaceship_poule"
export CURRENT_YEAR=$(date +%Y) export CURRENT_YEAR=$(date +%Y)
# add custom workflow scripts # add custom workflow scripts
export PATH=$WORKFLOW_PATH:$PATH export PATH=$WORKFLOW_PATH:$PATH
########## colors for logging #########
# https://wiki.archlinux.org/title/Bash/Prompt_customization#List_of_colors_for_prompt_and_Bash
#
# echo -e "${txtred}asd${txtwht}"
#
#######################################
export txtblk='\e[0;30m' # Black - Regular
export txtred='\e[0;31m' # Red
export txtgrn='\e[0;32m' # Green
export txtylw='\e[0;33m' # Yellow
export txtblu='\e[0;34m' # Blue
export txtpur='\e[0;35m' # Purple
export txtcyn='\e[0;36m' # Cyan
export txtwht='\e[0;37m' # White
export txtbold='\e[1m' # bold
export txtreset='\e(B\e[m' # back to normal
# --------- gestion des exclusions de rsync -------- #
EXCLUDE=( ".yarn" ".nvm" "cache" ".cache" "Cache" "Steam" "steamapps" ".npm" ".yarn" "node_modules" ".mozilla" "vendor" "Steam" ".rbenv" ".config/borg" "@eaDir" "steamapps" "bower_components" ".cargo" ".gem" ".BOINC")
exclude_opts=()
for item in "${EXCLUDE[@]}"; do
exclude_opts+=( --exclude "$item" )
done
export exclude_opts