Remove Cloud Backup Script
This commit is contained in:
@@ -5,7 +5,6 @@ help_menu() {
|
|||||||
|
|
||||||
rofi_menu() {
|
rofi_menu() {
|
||||||
declare -a options=(
|
declare -a options=(
|
||||||
" - backup-to-cloud"
|
|
||||||
" - backup-to-hdd"
|
" - backup-to-hdd"
|
||||||
" Back - back"
|
" Back - back"
|
||||||
" Quit - quit"
|
" Quit - quit"
|
||||||
@@ -30,9 +29,6 @@ main() {
|
|||||||
--help | -h)
|
--help | -h)
|
||||||
help_menu
|
help_menu
|
||||||
;;
|
;;
|
||||||
--backup-to-cloud)
|
|
||||||
kitty --hold /home/sravan/.scripts/backup_to_cloud.sh
|
|
||||||
;;
|
|
||||||
--backup-to-hdd)
|
--backup-to-hdd)
|
||||||
kitty --hold /home/sravan/.scripts/backup_to_hdd.sh
|
kitty --hold /home/sravan/.scripts/backup_to_hdd.sh
|
||||||
;;
|
;;
|
||||||
|
@@ -1,26 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
# Define base paths
|
|
||||||
gdrive_path="/mnt/google-drive"
|
|
||||||
gdrive_personal_path="$gdrive_path/sr98vn@gmail.com"
|
|
||||||
home_path="/home/sravan"
|
|
||||||
|
|
||||||
# Define arrays
|
|
||||||
declare -a source_dirs=(
|
|
||||||
"$home_path/Pictures/Wallpapers/"
|
|
||||||
"$home_path/Documents/"
|
|
||||||
)
|
|
||||||
declare -a target_dirs=(
|
|
||||||
"$gdrive_personal_path/Customization/Wallpapers/Desktop/"
|
|
||||||
"$gdrive_personal_path/Documents/"
|
|
||||||
)
|
|
||||||
|
|
||||||
# Loop through arrays
|
|
||||||
for i in ${!source_dirs[@]}; do
|
|
||||||
# Create target directories
|
|
||||||
mkdir -p "${target_dirs[$i]}"
|
|
||||||
|
|
||||||
# Copy source dirs to target dirs
|
|
||||||
rsync -a -v -L --progress --delete \
|
|
||||||
"${source_dirs[$i]}" \
|
|
||||||
"${target_dirs[$i]}"
|
|
||||||
done
|
|
@@ -10,3 +10,10 @@ Host casaos
|
|||||||
IdentityFile ~/.ssh/id_ed25519
|
IdentityFile ~/.ssh/id_ed25519
|
||||||
ForwardAgent yes
|
ForwardAgent yes
|
||||||
ForwardX11 yes
|
ForwardX11 yes
|
||||||
|
|
||||||
|
Host casaos-root
|
||||||
|
HostName casaos
|
||||||
|
User root
|
||||||
|
IdentityFile ~/.ssh/id_ed25519
|
||||||
|
ForwardAgent yes
|
||||||
|
ForwardX11 yes
|
||||||
|
42
README.org
42
README.org
@@ -79,7 +79,6 @@
|
|||||||
- [[#backups--syncing][Backups & Syncing]]
|
- [[#backups--syncing][Backups & Syncing]]
|
||||||
- [[#backups][Backups]]
|
- [[#backups][Backups]]
|
||||||
- [[#rsync-options][Rsync Options]]
|
- [[#rsync-options][Rsync Options]]
|
||||||
- [[#cloud][Cloud]]
|
|
||||||
- [[#hdd][HDD]]
|
- [[#hdd][HDD]]
|
||||||
- [[#rofi-menu][Rofi Menu]]
|
- [[#rofi-menu][Rofi Menu]]
|
||||||
- [[#syncthing][Syncthing]]
|
- [[#syncthing][Syncthing]]
|
||||||
@@ -7525,36 +7524,6 @@ inhibit_screensaver=1
|
|||||||
| --progress | show progress during transfer |
|
| --progress | show progress during transfer |
|
||||||
| --delete | delete extraneous files from dest dirs |
|
| --delete | delete extraneous files from dest dirs |
|
||||||
|
|
||||||
*** Cloud
|
|
||||||
|
|
||||||
#+BEGIN_SRC shell :shebang #!/bin/bash :tangle .scripts/backup_to_cloud.sh
|
|
||||||
# Define base paths
|
|
||||||
gdrive_path="/mnt/google-drive"
|
|
||||||
gdrive_personal_path="$gdrive_path/sr98vn@gmail.com"
|
|
||||||
home_path="/home/sravan"
|
|
||||||
|
|
||||||
# Define arrays
|
|
||||||
declare -a source_dirs=(
|
|
||||||
"$home_path/Pictures/Wallpapers/"
|
|
||||||
"$home_path/Documents/"
|
|
||||||
)
|
|
||||||
declare -a target_dirs=(
|
|
||||||
"$gdrive_personal_path/Customization/Wallpapers/Desktop/"
|
|
||||||
"$gdrive_personal_path/Documents/"
|
|
||||||
)
|
|
||||||
|
|
||||||
# Loop through arrays
|
|
||||||
for i in ${!source_dirs[@]}; do
|
|
||||||
# Create target directories
|
|
||||||
mkdir -p "${target_dirs[$i]}"
|
|
||||||
|
|
||||||
# Copy source dirs to target dirs
|
|
||||||
rsync -a -v -L --progress --delete \
|
|
||||||
"${source_dirs[$i]}" \
|
|
||||||
"${target_dirs[$i]}"
|
|
||||||
done
|
|
||||||
#+END_SRC
|
|
||||||
|
|
||||||
*** HDD
|
*** HDD
|
||||||
|
|
||||||
#+BEGIN_SRC shell :shebang #!/bin/bash :tangle .scripts/backup_to_hdd.sh
|
#+BEGIN_SRC shell :shebang #!/bin/bash :tangle .scripts/backup_to_hdd.sh
|
||||||
@@ -7574,7 +7543,6 @@ help_menu() {
|
|||||||
|
|
||||||
rofi_menu() {
|
rofi_menu() {
|
||||||
declare -a options=(
|
declare -a options=(
|
||||||
" - backup-to-cloud"
|
|
||||||
" - backup-to-hdd"
|
" - backup-to-hdd"
|
||||||
" Back - back"
|
" Back - back"
|
||||||
" Quit - quit"
|
" Quit - quit"
|
||||||
@@ -7599,9 +7567,6 @@ main() {
|
|||||||
--help | -h)
|
--help | -h)
|
||||||
help_menu
|
help_menu
|
||||||
;;
|
;;
|
||||||
--backup-to-cloud)
|
|
||||||
kitty --hold /home/sravan/.scripts/backup_to_cloud.sh
|
|
||||||
;;
|
|
||||||
--backup-to-hdd)
|
--backup-to-hdd)
|
||||||
kitty --hold /home/sravan/.scripts/backup_to_hdd.sh
|
kitty --hold /home/sravan/.scripts/backup_to_hdd.sh
|
||||||
;;
|
;;
|
||||||
@@ -7974,6 +7939,13 @@ Host casaos
|
|||||||
IdentityFile ~/.ssh/id_ed25519
|
IdentityFile ~/.ssh/id_ed25519
|
||||||
ForwardAgent yes
|
ForwardAgent yes
|
||||||
ForwardX11 yes
|
ForwardX11 yes
|
||||||
|
|
||||||
|
Host casaos-root
|
||||||
|
HostName casaos
|
||||||
|
User root
|
||||||
|
IdentityFile ~/.ssh/id_ed25519
|
||||||
|
ForwardAgent yes
|
||||||
|
ForwardX11 yes
|
||||||
#+END_SRC
|
#+END_SRC
|
||||||
|
|
||||||
* System Settings
|
* System Settings
|
||||||
|
Reference in New Issue
Block a user