backup: Use paths sent from dom0 to filter files that should be extracted
This commit is contained in:
parent
8f840e10dc
commit
fa6bb43c62
@ -1,11 +1,13 @@
|
|||||||
echo Starting Restorecopy >2
|
echo Starting Restorecopy >2
|
||||||
read args
|
read args
|
||||||
|
read paths
|
||||||
echo Arguments: $args >2
|
echo Arguments: $args >2
|
||||||
|
echo Paths: $paths >2
|
||||||
if [ -f "$args" ] ; then
|
if [ -f "$args" ] ; then
|
||||||
echo "Performing restore from backup file $args" >2
|
echo "Performing restore from backup file $args" >2
|
||||||
TARGET="$args"
|
TARGET="$args"
|
||||||
echo "Copying $TARGET to STDOUT" >2
|
echo "Copying $TARGET to STDOUT" >2
|
||||||
/usr/lib/qubes/tar2qfile $TARGET
|
/usr/lib/qubes/tar2qfile $TARGET $paths
|
||||||
else
|
else
|
||||||
echo "Checking if arguments is matching a command" >2
|
echo "Checking if arguments is matching a command" >2
|
||||||
COMMAND=`echo $args | cut -d ' ' -f 1`
|
COMMAND=`echo $args | cut -d ' ' -f 1`
|
||||||
@ -20,7 +22,7 @@ else
|
|||||||
# Use named pipe to pass original stdin to tar2file
|
# Use named pipe to pass original stdin to tar2file
|
||||||
$@ > $tmpdir/backup-data < /dev/null &
|
$@ > $tmpdir/backup-data < /dev/null &
|
||||||
retcode=$?
|
retcode=$?
|
||||||
/usr/lib/qubes/tar2qfile $tmpdir/backup-data
|
/usr/lib/qubes/tar2qfile $tmpdir/backup-data $paths
|
||||||
wait
|
wait
|
||||||
rm $tmpdir/backup-data
|
rm $tmpdir/backup-data
|
||||||
rmdir $tmpdir
|
rmdir $tmpdir
|
||||||
|
Loading…
Reference in New Issue
Block a user