403Webshell
Server IP : 172.67.191.97  /  Your IP : 104.23.243.197
Web Server : Apache/2.4.63 (Ubuntu)
System : Linux adminpruebas-Virtual-Machine 6.14.0-37-generic #37-Ubuntu SMP PREEMPT_DYNAMIC Fri Nov 14 22:10:32 UTC 2025 x86_64
User : www-data ( 33)
PHP Version : 8.4.5
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : ON
Directory :  /usr/libexec/deja-dup/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /usr/libexec/deja-dup/restic-dump-to
#!/bin/sh
# -*- Mode: sh; indent-tabs-mode: nil; tab-width: 2; coding: utf-8 -*-
#
# SPDX-License-Identifier: GPL-3.0-or-later
# SPDX-FileCopyrightText: Michael Terry


# Restic does not let us ask it to restore a file to an arbitrary path.
# Instead, you can only ask it to restore a path into another path.
# So restoring /a/b into /x/y will result in /x/y/a/b rather than the
# desired (by deja-dup) /x/y/b.
#
# So this wrapper abstracts that by redirecting the output of "restic dump"
# into a target file, handling directories which come in as tar files, as well
# as normal files which come in direct.
#
# Call this script like so:
# restic-dump-to reg /working/dir /target/file [restic dump ...]
# restic-dump-to dir /working/dir /target/dir [restic dump ...]
#
# Those commands will drop the target of the dump command into the given
# directory.

set -e

KIND=$1
WORKINGDIR=$2
TARGETFILE=$3
shift 3

if [ "$KIND" = "dir" ]; then
  # The ${VAR#/} syntax strips the leading slash
  SLASHES=$(echo "${TARGETFILE#/}" | tr -cd /)

  # The ${#VAR} syntax gives count of characters
  exec "$@" | tar x -C "$WORKINGDIR" --strip-components "${#SLASHES}"
else
  BASENAME=$(basename "$TARGETFILE")
  exec "$@" > "$WORKINGDIR/$BASENAME"
fi

Youez - 2016 - github.com/yon3zu
LinuXploit