Added backup script
This commit is contained in:
@@ -71,7 +71,7 @@ alias "f.."="f ..."
|
||||
function mvd() { mv $1 ~/Downloads ; }
|
||||
alias lhd="sudo fdisk -l"
|
||||
alias ds="df -h | grep sd"
|
||||
alias nbu="ll /run/media/kevin/pc-backup/backups/nzxt | grep tgz"
|
||||
alias nbu="f /run/media/kevin/pc-backup/backups/nzxt && ll | grep gz"
|
||||
|
||||
# }}} directory-related #
|
||||
|
||||
|
||||
12
backup.sh
Executable file
12
backup.sh
Executable file
@@ -0,0 +1,12 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Backup destination
|
||||
backup_dest=/run/media/kevin/pc-backup/backups/nzxt
|
||||
|
||||
# Labels for backup name
|
||||
PC=${HOST}
|
||||
distro=arch
|
||||
datetime=$(date "+%m.%d-%H.%M")
|
||||
backupfile="$backup_dest/$datetime-$distro.tar.gz"
|
||||
|
||||
sudo tar -czpvf $backupfile --exclude=/lost+found --exclude=/mnt --exclude=/proc --exclude=/run --exclude=/sys /
|
||||
2
dirs.sh
2
dirs.sh
@@ -1,3 +1,5 @@
|
||||
#!/bin/sh
|
||||
|
||||
linux_config_dir=~/linux-config
|
||||
dot_dir=$linux_config_dir/dotfiles
|
||||
config_dir=$linux_config_dir/configs
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#!/bin/sh
|
||||
|
||||
# Get directory variables from script.
|
||||
sh ../../dirs.sh
|
||||
. ../../dirs.sh
|
||||
|
||||
config_file_name="10-evdev.conf"
|
||||
sys_layout_file="/etc/X11/xorg.conf.d/$config_file_name"
|
||||
|
||||
Reference in New Issue
Block a user