Skip to content
Snippets Groups Projects
Commit dae1110b authored by James Vasile's avatar James Vasile
Browse files

Add backup admin task

parent 4cc975af
No related branches found
No related tags found
No related merge requests found
......@@ -20,6 +20,48 @@ _apt-get-install () {
done
}
backup() {
echo Hot backups
# Choose our destination
DEST=francium
if [[ "$(cat /etc/hostname)" =~ "francium" ]]; then
DEST=silicon
fi
pushd ~
# Note the -t parameter to rsync. It causes the destination to conform the timestamp.
# This is important because when we do our next backup, it will use timestamp+size to
# skip, which does a great deal for speedup.
rsync -tlrvzpP OTS Documents src $DEST:/home/james
rsync -tlrvzpP /home/james $DEST:/home \
--exclude "/home/james/Documents" \
--exclude "/home/james/OTS" \
--exclude "/home/james/src" \
--exclude ".arduino15" \
--exclude ".atom" \
--exclude ".cache" \
--exclude ".cargo" \
--exclude ".cabal" \
--exclude ".conan" \
--exclude ".config" \
--exclude ".cookiecutters" \
--exclude ".dartServer" \
--exclude ".expressif" \
--exclude ".gem" \
--exclude ".gradle" \
--exclude ".recol" \
--exclude ".ros_history" \
--exclude ".roswell" \
--exclude ".rustup" \
--exclude "Android" \
--exclude "snap" \
--exclude "Downloads"
popd
}
lid-off() {
echo Turning off lid-triggered sleep
sudo mkdir -p /etc/systemd/logind.conf.d
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment