mirror of
https://github.com/kevinveenbirkenbach/linux-image-manager.git
synced 2024-11-14 11:31:04 +01:00
Implemented scripts to backup repositories
This commit is contained in:
parent
5531b313d8
commit
6ce2ab8a31
@ -41,6 +41,7 @@ $HOME/Documents/certificates/ | Contains certificates to authenticate via [certi
|
|||||||
| $HOME/Documents/recovery_codes/ | Contains files with recovery_codes e.g. for [Two-factor authentication](https://en.wikipedia.org/wiki/Multi-factor_authentication). |
|
| $HOME/Documents/recovery_codes/ | Contains files with recovery_codes e.g. for [Two-factor authentication](https://en.wikipedia.org/wiki/Multi-factor_authentication). |
|
||||||
| $HOME/Documents/identity/ | Contains files to prove the identity of the *Core System Owner* in physical live like passports. |
|
| $HOME/Documents/identity/ | Contains files to prove the identity of the *Core System Owner* in physical live like passports. |
|
||||||
| $HOME/Documents/passwords/ | Contains e.g the [KeePassXC](https://keepassxc.org/) database with all *Core System Owner* passwords. |
|
| $HOME/Documents/passwords/ | Contains e.g the [KeePassXC](https://keepassxc.org/) database with all *Core System Owner* passwords. |
|
||||||
|
| $HOME/Documents/repositories/ | Contains all git repositories |
|
||||||
|
|
||||||
### Functions
|
### Functions
|
||||||
|
|
||||||
@ -51,6 +52,8 @@ $HOME/Documents/certificates/ | Contains certificates to authenticate via [certi
|
|||||||
| ```bash ./scripts/export-data-to-system.sh``` | Export data to the host system.|
|
| ```bash ./scripts/export-data-to-system.sh``` | Export data to the host system.|
|
||||||
| ```bash ./scripts/unlock.sh``` | Unlock the stored data.|
|
| ```bash ./scripts/unlock.sh``` | Unlock the stored data.|
|
||||||
| ```bash ./scripts/lock.sh``` | Lock the stored data |
|
| ```bash ./scripts/lock.sh``` | Lock the stored data |
|
||||||
|
| ```bash ./scripts/pull-local-repositories.sh``` | Pulls all local repositories branches |
|
||||||
|
| ```bash ./scripts/pushs-local-repositories.sh``` | Pushs all local repositories branches |
|
||||||
| ```encfsctl passwd .encrypted``` | Change the password of the encrypted folder. |
|
| ```encfsctl passwd .encrypted``` | Change the password of the encrypted folder. |
|
||||||
|
|
||||||
## License
|
## License
|
||||||
|
@ -10,4 +10,5 @@ DECRYPTED_PATH="$REPOSITORY_PATH/decrypted";
|
|||||||
SCRIPT_PATH="$REPOSITORY_PATH/scripts";
|
SCRIPT_PATH="$REPOSITORY_PATH/scripts";
|
||||||
DATA_PATH="$DECRYPTED_PATH/data";
|
DATA_PATH="$DECRYPTED_PATH/data";
|
||||||
BACKUP_PATH="$DECRYPTED_PATH/backup";
|
BACKUP_PATH="$DECRYPTED_PATH/backup";
|
||||||
TEMPLATE_PATH="$REPOSITORY_PATH/templates"
|
TEMPLATE_PATH="$REPOSITORY_PATH/templates";
|
||||||
|
LOCAL_REPOSITORIES_PATH="$HOME/Documents/repositories";
|
||||||
|
@ -27,7 +27,6 @@ declare -a BACKUP_LIST=("$HOME/.ssh/" \
|
|||||||
"$HOME/Documents/recovery_codes/" \
|
"$HOME/Documents/recovery_codes/" \
|
||||||
"$HOME/Documents/identity/" \
|
"$HOME/Documents/identity/" \
|
||||||
"$HOME/Documents/passwords/" \
|
"$HOME/Documents/passwords/" \
|
||||||
"$HOME/Documents/repositories/application" \
|
|
||||||
"$HOME/.local/share/rhythmbox/rhythmdb.xml" \
|
"$HOME/.local/share/rhythmbox/rhythmdb.xml" \
|
||||||
"$HOME/.config/keepassxc/keepassxc.ini");
|
"$HOME/.config/keepassxc/keepassxc.ini");
|
||||||
for system_item_path in "${BACKUP_LIST[@]}";
|
for system_item_path in "${BACKUP_LIST[@]}";
|
||||||
|
6
scripts/pull-local-repositories.sh
Normal file
6
scripts/pull-local-repositories.sh
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
#
|
||||||
|
# Pushs all repositories
|
||||||
|
# @author Kevin Veen-Birkenbach [aka. Frantz]
|
||||||
|
source "$(dirname "$(readlink -f "${0}")")/base.sh"
|
||||||
|
bash "$SCRIPT_PATH/push-local-repositories.sh" push
|
13
scripts/push-local-repositories.sh
Normal file
13
scripts/push-local-repositories.sh
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
#
|
||||||
|
# Pushs all repositories
|
||||||
|
# @param $1 git command which should be executed instead of default pull
|
||||||
|
# @author Kevin Veen-Birkenbach [aka. Frantz]
|
||||||
|
source "$(dirname "$(readlink -f "${0}")")/base.sh"
|
||||||
|
if [ $# -eq 1 ]
|
||||||
|
then
|
||||||
|
git_command=$1
|
||||||
|
else
|
||||||
|
git_command="push"
|
||||||
|
fi
|
||||||
|
find $LOCAL_REPOSITORIES_PATH -maxdepth 1 -mindepth 1 -type d -exec bash -c "(cd {} && echo 'In directory: {}' && git status && echo 'Executes git $git_command' && git $git_command --all)" \;
|
Loading…
Reference in New Issue
Block a user