aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to '')
-rwxr-xr-xbin/backup-usb32.sh18
1 files changed, 17 insertions, 1 deletions
diff --git a/bin/backup-usb32.sh b/bin/backup-usb32.sh
index 6dd038f..3a0002e 100755
--- a/bin/backup-usb32.sh
+++ b/bin/backup-usb32.sh
@@ -1,8 +1,24 @@
#!/usr/bin/env bash
-rsync -az -u -v /mnt/32 ~/Documents/32.bak/
+if [ "$#" -ne 6 ]; then
+ echo "Usage: $0 <source_directory> <local_destination_directory> <remote_destination_directory> <username> <server_address> <ssh_port>"
+ exit 1
+fi
+
+source_directory="$1"
+local_destination_directory="$2"
+remote_destination_directory="$3"
+username="$4"
+server_address="$5"
+ssh_port="$6"
+
+# Backup USB key to local machine
+rsync -az -u -v "$source_directory" "$local_destination_directory"
# --archive, -a archive mode is -rlptgoD (no -A,-X,-U,-N,-H)
# --compress, -z compress file data during the transfer
# --update, -u skip files that are newer on the receiver
# --verbose, -v increase verbosity
+
+# Backup USB key to server over SSH using the provided port
+rsync -az -u -v -e "ssh -p $ssh_port" "$source_directory" "$username"@"$server_address":"$remote_destination_directory"
pan>Catch exception related to search functionalitysaid belhadj4-3/+11 2021-06-27Delete TEST-musichub.business.CategoryTest.xmlSaid Belhadj1-58/+0 2021-06-27Add unit test for Category and Languagesaid belhadj4-0/+164 2021-06-27Update search functionalitysaid belhadj2-0/+8 2021-06-27Added an extension check for songs and covered it with a test.Clyhtsuriva65-77/+92 2021-06-27Fix : Javadoc missingClyhtsuriva80-0/+8465 2021-06-27PlayList class covered at 84%.Clyhtsuriva14-78/+117 2021-06-27Song class fully covered.Clyhtsuriva13-49/+96 2021-06-27Starting Song testsClyhtsuriva17-59/+119 2021-06-27Changed the log type for the JUnit test of LogHandlerClyhtsuriva5-26/+4 2021-06-27XMLHandler tests covered at 91%Clyhtsuriva93-7962/+82