From: Nils Date: Sat, 9 Nov 2024 03:23:25 +0000 (+0100) Subject: initial commit X-Git-Url: https://gitweb.forssennils.se/?a=commitdiff_plain;h=dff3ee6a817fe1ab529e31ddedf7a3f46ef46639;p=windows_backup_script.git initial commit --- dff3ee6a817fe1ab529e31ddedf7a3f46ef46639 diff --git a/backup_script.bat b/backup_script.bat new file mode 100644 index 0000000..19030aa --- /dev/null +++ b/backup_script.bat @@ -0,0 +1,11 @@ +cd C://users//forss + +tar -cvpzf backup/backup.tar.gz ./Documents ./Videos ./Pictures ./Music ./Downloads D:/Documents D:/Pictures D:/Videos + +scp backup/backup.tar.gz nils@%SERVER_IP%:~/backup_tar/ + +ssh nils@%SERVER_IP% cp backup_tar/backup.tar.gz /backup/ + +ssh nils@%SERVER_IP% tar -xpvf /mnt/USB/backup/backup.tar.gz -C /backup/ + +ssh nils@%SERVER_IP% rm -rf backup_tar/backup.tar.gz \ No newline at end of file