403Webshell
Server IP : 104.21.95.231  /  Your IP : 162.159.114.31
Web Server : Apache
System : Linux vm3310.eosdns.net 4.18.0-553.132.1.el8_10.x86_64 #1 SMP Thu Jun 11 14:27:43 UTC 2026 x86_64
User : carnalmedia ( 1000)
PHP Version : 7.4.33
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : ON
Directory :  /mojo/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /mojo/restic_backup
#!/bin/bash
#
# Script: restic_backup
#
# Usage: restic_backup
#
# Description: A tool for creating a backup of the server, using restic
#
# Author: Nikita Shchetinin
#
# Changelog:
# * 10.08.2021: Nikita Shchetinin
# - Initial write

if [ "$(whoami)" != 'root' ]
then
	echo "You must execute this script as the root user!"
	exit 1
fi

BACKUP () {
if ! which restic > /dev/null 2>&1
then
	echo "The binary of restic has not been found in $PATH!"
	exit 1
fi
if [ ! -f /root/.restic.env ]
then
	echo "A file with environmental variables of restic has not been found at /root/.restic.env!"
	exit 1
fi
if [ ! -f /root/restic.files ]
then
	echo "A list of files that need to be backed up has not been found at /root/restic.files!"
	exit 1
fi
source /root/.restic.env
restic forget --keep-last 4
restic backup --files-from=/root/restic.files
}

HELP () {
echo "A tool for creating a backup of the server, using restic"
echo "usage: restic_backup"
}

if [[ "$#" -gt 0 ]]
then
	HELP
else
	BACKUP
fi

Youez - 2016 - github.com/yon3zu
LinuXploit