That backup script I found here?

The one to backup KDE & all the settings. When I run it, I get a msg saying it needs to be setup.

Maybe because the script you found is for a specific user? That’s my guess because I have no idea what script you are talking about.

I will cut & paste it here, what is the command to put it in a scollable box in the forum? I thought it was the </>, but that didn’t do it.

When posting terminal output, copy the output and paste it here, wrapped in three (3) backticks, before AND after the pasted text. Like this:

```
pasted text
```

Or three (3) tilde signs, like this:

~~~
pasted text
~~~

This will just cause it to be rendered like this:

Sed
sollicitudin dolor
eget nisl elit id
condimentum
arcu erat varius
cursus sem quis eros.

Instead of like this:

Sed sollicitudin dolor eget nisl elit id condimentum arcu erat varius cursus sem quis eros.

Alternatively, paste the text you wish to format as terminal output, select all pasted text, and click the </> button on the taskbar. This will indent the whole pasted section with one TAB, causing it to render the same way as described above.

Thereby increasing legibility thus making it easier for those trying to provide assistance.

For more information, please see:


:bangbang::bangbang: Additionally

If your language isn’t English, please prepend any and all terminal commands with LC_ALL=C. For example:

LC_ALL=C bluetoothctl

This will just cause the terminal output to be in English, making it easier to understand and debug.

A script should be posted as preformatted text using </> button or Ctrl + E etc.

Or upload it to an online pastebin and post a link to it here

Ok thanks

 This program is distributed in the hope that it will be useful,
#    but WITHOUT ANY WARRANTY; without even the implied warranty of
#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
#    GNU General Public License for more details.
#
#    You should have received a copy of the GNU General Public License
#    along with this program.  If not, see <https://www.gnu.org/licenses/>.
#
#    @linux-aarhus - root.nix.dk
#
# ##########################################################
# Modify as necessary
# NOTE: some files and folders contains sensitive information

# example filelist=('.bash_profile' '.bashrc' '.netrc' '.profile' '.zshrc')
filelist=('.bash_profile' '.bashrc' '.netrc' '.profile' '.zshrc')

# example folderlist=('.config' '.local' '.gnupg' '.mozilla' '.ssh' '.thunderbird')
folderlist=('.config' '.local' '.gnupg' '.mozilla' '.ssh' '.thunderbird')

# configuration file name
archive_file="dotconf.tar.gz"

# official repo package list
repo_pkg_file="repo-pkglist.txt"

# custom package list
cust_pkg_file="cust-pkglist.txt"

# Do not edit below this line - unless you know what you are doing.
# ##########################################################

SCRIPTNAME=$(basename "$0")
VERSION="0.2"
if [[ -z $1 ]]; then
    echo ":: $SCRIPTNAME v$VERSION"
    echo "==> missing argument: PATH"
    echo "Usage:"
    echo "  $SCRIPTNAME /path/to/backup"
    echo "  Path to store output"
    echo "  e.g. $SCRIPTNAME /home/$USER/backup"
    echo ""
    exit
fi

set -e

if ! [[ -d $1 ]]; then
    mkdir -p $1
fi

conf_archive="$1/$archive_file"
repo_pkg_list="$1/$repo_pkg_file"
cust_pkg_list="$1/$cust_pkg_file"

# create an archive of common hidden files and folders

if [[ -e "$conf_archive" ]]; then
    # remove archive if exist
    rm -f "$conf_archive"
fi

todo=""
for file in ${filelist[@]}; do
    if [[ -f $file ]]; then
        todo+="${file} "
    fi
done

for folder in ${folderlist[@]}; do
    if [[ -d ${folder} ]]; then
        todo+="${folder} "
    fi
done

tar -zcvf "$conf_archive" $todo

# list packages from official repo
pacman -Qqen > "$repo_pkg_list"

# list foreign packages (custom e.g. AUR)
pacman -Qqem > "$cust_pkg_list"

echo " ==> Packagelists created"
echo "   --> $repo_pkg_list"
echo "   --> $cust_pkg_list"
echo " ==> Config archive created"
echo "   --> $conf_archive"
echo " ==> To install packages from lists"
echo "   --> sudo pacman -Syu --needed - < $repo_pkg_file"
echo " ==> To restore the configuration files run"
echo "   --> tar -xzf --overwrite -C $HOME $archive_file"
echo ""

And you didn’t think showing us the error you get, from the command you type, would help understand your cryptic question?

2 Likes

Warning: Could not find ‘/home/nickj/Desktop/Backup.sh’, starting ‘/bin/bash’ instead. Please check your profile settings.

Again there is no context at all, no explanation, just a random message from who knows where. Also this is absolutely not the message you initially talked about

I already feel the heat going up, I’m done, good luck to the others.

The comment above is the script from [root tip] [Utililty Script] Backup configuration and package list

  1. you are missing the first lines
    • most importantly the line defining the shell to use.
  2. the first line is not commented
    • causing the the shell to try interpret what should have been a comment as actual commands

Do yourself a favor and copy the whole script - and paste it into whichever file you saved it as

2 Likes

This sounds good, anyone ever use it?https://www.youtube.com/watch?v=o5by8HNL7I4 oh nevermind https://www.youtube.com/watch?v=UY6KeHkgUMI