mirror of
https://gitlab.archlinux.org/tpowa/archboot.git
synced 2024-09-19 11:30:37 +02:00
add /var/lib/systemd and /var/run to exclude directories, update usage text
This commit is contained in:
parent
6f6ebf7899
commit
a6b34c1d10
1 changed files with 10 additions and 10 deletions
|
@ -7,16 +7,16 @@
|
|||
. /usr/lib/archboot/common.sh
|
||||
_usage()
|
||||
{
|
||||
echo -e "\e[1mWelcome to \e[36mARCHBOOT\e[m\e[1m - RSYNC BACKUP:\e[m"
|
||||
echo -e "\e[1m-----------------------------------\e[m"
|
||||
echo -e "- Copy \e[1mbackupdir\e[m to \e[1mbackupdestination\e[m using rsync."
|
||||
echo -e "- For system backup, start with \e[1mfull\e[m mounted system and then invoke this script"
|
||||
echo -e " with system's root directory as \e[1mbackupdir\e[m."
|
||||
echo -e "- \e[1mexcluded\e[m directories are \e[1m/dev /tmp /proc /sys /run /mnt /media /lost+found\e[m"
|
||||
echo -e " \e[1mexcluded\e[m \e[1m/sysroot /var/run /var/lib/systemd\e[m"
|
||||
echo -e "- \e[1m--numeric-ids\e[m option is invoked to \e[1mpreserve\e[m users"
|
||||
echo -e "\e[1m\e[36mArchboot\e[m\e[1m - Rsync Backup:\e[m"
|
||||
echo -e "\e[1m------------------------\e[m"
|
||||
echo -e "- Copy \e[1m<backupdir>\e[m to \e[1m<backupdestination>\e[m using rsync."
|
||||
echo -e "- For system backup, start with \e[1mfull\e[m mounted system and then"
|
||||
echo -e " invoke this script with system's root directory as \e[1mbackupdir\e[m."
|
||||
echo -e "- \e[1mExcluded\e[m directories are: \e[1m/dev /lost+found /mnt /media /proc /run /sys\e[m"
|
||||
echo -e " \e[1m/sysroot /tmp /var/lib/systemd /var/run\e[m"
|
||||
echo -e "- \e[1mUsers\e[m are \e[1mpreserved\e[m as numeric-ids"
|
||||
echo ""
|
||||
echo -e "usage: \e[1m${_BASENAME} <backupdir> <backupdestination>\e[m"
|
||||
echo -e "Usage: \e[1m${_BASENAME} <backupdir> <backupdestination>\e[m"
|
||||
exit 0
|
||||
}
|
||||
##################################################
|
||||
|
@ -26,6 +26,6 @@ fi
|
|||
_BACKUPDESTINATION="${2}"
|
||||
_BACKUPDIR="${1}"
|
||||
rsync -aAXv --numeric-ids \
|
||||
--exclude={"/dev/*","/proc/*","/sys/*","/tmp/*","/run/*","/mnt/*","/media/*","/lost+found","/sysroot/*"} \
|
||||
--exclude={"/dev/*","/lost+found","/media/*","/mnt/*","/proc/*","/run/*","/sys/*","/sysroot/*","/tmp/*","/var/lib/systemd/*","/var/run/*"} \
|
||||
"${_BACKUPDIR}" "${_BACKUPDESTINATION}"
|
||||
|
||||
|
|
Loading…
Reference in a new issue