consolidate all repos to one for archive
This commit is contained in:
19
semester_4/sistemska_administracija/Naloga_5/restore.sh
Normal file
19
semester_4/sistemska_administracija/Naloga_5/restore.sh
Normal file
@@ -0,0 +1,19 @@
|
||||
#!/bin/bash
|
||||
|
||||
backup_criinc="/mnt/backup/26097/criinc/nik/Maildir"
|
||||
destination_criinc="/home/nik/Maildir"
|
||||
|
||||
backup_othmir="/mnt/backup/26097/othmir"
|
||||
destination_othmir="/home/nik"
|
||||
|
||||
if [ -d "$destination_dir" ]; then
|
||||
read -p "POZOR: Obstojajo podatki v direktoriju $destination_dir. Nadomestim? (da/ne) " confirm
|
||||
if [ "$confirm" != "da" ]; then
|
||||
echo "Obnovitev prekinjena."
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
|
||||
# rsync -av $backup_othmir/ $destination_othmir
|
||||
|
||||
rdiff-backup --force --restore-as-of now $backup_criinc $destination_criinc
|
||||
Reference in New Issue
Block a user