🚧 Adjusted mkbackup and created mkrestore scripts
This commit is contained in:
parent
bef3e7e410
commit
31ee3ee801
2 changed files with 13 additions and 1 deletions
|
|
@ -2,4 +2,4 @@
|
|||
|
||||
BACKUP_DATE=$(date +%m_%d_%Y)
|
||||
|
||||
doas rsync -aHAXS --exclude={"/dev/*","/proc/*","/sys/*","/tmp/*","/run/*","/mnt/*","/media/*","/lost+found","/var/cache/distfiles/*","/var/cache/ccache/*","/home/brian/Documents/books/*","/home/brian/Videos/*","/home/brian/Music/*","/home/brian/Pictures/*","/home/brian/Audio/*","/home/brian/Games/*"} /* /mnt/media/usb-drive/gentoo_backup_"${BACKUP_DATE}"
|
||||
doas rsync -aHAXS --exclude={"/dev/*","/proc/*","/sys/*","/tmp/*","/run/*","/mnt/*","/media/*","/lost+found","/var/cache/distfiles/*","/var/cache/ccache/*","/home/brian/Documents/books/*","/home/brian/Videos/*","/home/brian/Music/*","/home/brian/Pictures/*","/home/brian/Audio/*","/home/brian/Games/*"} / /mnt/media/usb-drive/gentoo_backup_"${BACKUP_DATE}"
|
||||
|
|
|
|||
12
scripts/mkrestore
Executable file
12
scripts/mkrestore
Executable file
|
|
@ -0,0 +1,12 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
BACKUP_DIR="$1"
|
||||
|
||||
if [ -z "$BACKUP_DIR" ]; then
|
||||
echo "Usage: $0 gentoo_backup_YYYY-MM-DD"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
doas rsync -aHAXS --numeric-ids --delete --info=progress2 \
|
||||
"/mnt/media/usb-drive/${BACKUP_DIR}/" \
|
||||
/
|
||||
Loading…
Add table
Add a link
Reference in a new issue