backup-to-HDD-1.sh performs a backup of a set of specified directories
to an external hard drive.
The set of directories, and their specific options, are hardcoded in
the script's `sync_multimedia_dirs` and `sync_data_dirs` functions.
The destination of the backup (the mount point of the external drive)
can be specified as a parameter on the command line (defaults to
'/media/luca/HDD-1').
* Update comments describing functions and variables
* Save log files to a dedicated subdirectory in the user's home folder:
* Check if XDG_CACHE_HOME environment variable is set:
* If yes, subdirectory is "$XDG_CACHE_HOME/rsync-via-ssh"
* Otherwise, subdirectory is "$HOME/.cache/rsync-via-ssh"
* Add -h and --update to rsync options
rsync-via-ssh is a script I designed to sync files and directories between
to machines (e.g. a laptop and a desktop) using rsync over a SSH connection.
The directories which are synchronized are hardcoded inside the script's
'run_rsync' function, because that suits my use case.
Currently the script has one mandatory argument: the IP address of the
remote host (the destination of the sync). Optional arguments are:
the port on which the SSH server on the remote host is listening,
a custom filename for the log file genarated by the script.
An interactive mode is in development.
limit-battery-charge is a script used to set a limit to battery charge
on supported laptops (currently tested only on my ASUS VivoBook S15).
This helps preserve battery health.
Credits to the ArchWiki (https://wiki.archlinux.org/title/Laptop/ASUS),
from which I took the information needed to write this script.