如何仅使用最小的救援系统备份文件?

如何仅使用最小的救援系统备份文件?

我只能通过 ssh 通过最小救援系统访问我的虚拟服务器。它没有scpftp安装。有没有一种简单的方法来备份文件,最好直接备份到 ftp 服务器,但备份到我的本地计算机也可以。

也许这有助于展示救援系统的能力:

uname -a
Linux customer-rescue-v5 2.6.38.1-GN-SMP_x86_64 #5 SMP Fri Apr 8 13:27:16 CEST 2011 x86_64 QEMU Virtual CPU version 0.14.1 GenuineIntel GNU/Linux
customer-rescue-v5 ~ # compgen -c
if
then
else
elif
fi
case
esac
for
select
while
until
do
done
in
function
time
{
}
!
[[
]]
.
:
[
alias
bg
bind
break
builtin
caller
cd
command
compgen
complete
continue
declare
dirs
disown
echo
enable
eval
exec
exit
export
false
fc
fg
getopts
hash
help
history
jobs
kill
let
local
logout
popd
printf
pushd
pwd
read
readonly
return
set
shift
shopt
source
suspend
test
times
trap
true
type
typeset
ulimit
umask
unalias
unset
wait
crond
dropbear
rmd160
sha256
sha384
sha512
backup-tar
addpart
update-pciids
backup.sh
biosdecode
delpart
dmidecode
dump-remind
hashalot
iconvconfig
locale-gen
lspci
memtester
mklost+found
nscd
ntpd
ntpdate
ownership
partx
pcimodules
readprofile
restore-tar
rmt
rpcinfo
setpci
tcpdump
tunelp
vpddecode
zdump
zic
install
crond
dropbear
rmd160
sha256
sha384
sha512
backup-tar
addpart
update-pciids
backup.sh
biosdecode
delpart
dmidecode
dump-remind
hashalot
iconvconfig
locale-gen
lspci
memtester
mklost+found
nscd
ntpd
ntpdate
ownership
partx
pcimodules
readprofile
restore-tar
rmt
rpcinfo
setpci
tcpdump
tunelp
vpddecode
zdump
zic
install
arping
awk
base64
basename
captoinfo
cat
chgrp
chmod
chown
chroot
cksum
comm
cp
cut
date
dbclient
dd
df
dir
dircolors
dirname
dropbearkey
du
echo
env
ex
expr
false
find
fuser
head
hostid
id
infotocap
jmacs
jpico
jstar
killall
last
less
link
ln
logname
ls
mkdir
mkfifo
mknod
mv
nano
nice
nohup
nslookup
oldfuser
passwd
pkill
printenv
pstree
ptx
pwd
readlink
reset
rjoe
rm
rmdir
rview
rvim
seq
sha224sum
shuf
sha256sum
sha384sum
sha512sum
sleep
snice
sort
split
ssh
stat
strings
stty
sync
tee
telnet
time
touch
tr
traceroute
true
tty
uname
uniq
unlink
vdir
vi
view
vimdiff
wc
wget
who
whoami
yes
bashbug
[
catchsegv
cal
compile_et
clear
col
colcrt
colrm
column
dropbearmulti
csplit
cytune
ddate
exuberant-ctags
expand
localedef
factor
fdformat
flock
fmt
fold
free
gencat
getconf
getent
getopt
hexdump
iconv
infocmp
ipcrm
ipcs
isosize
joe
join
ldd
lddlibc4
line
locale
ntp-keygen
logger
look
mcookie
md5sum
mk_cmds
mtrace
namei
nl
pcprofiledump
ntp-wait
ntpdc
ntpq
ntptime
ntptrace
od
paste
pathchk
pgrep
pg
pinky
pmap
pr
printf
pwdx
raw
rename
renice
rev
rlfe
rpcgen
rsync
screen
script
setfdprm
setsid
setterm
sha1sum
shred
skill
slabtop
sntp
sprof
sum
tac
tack
tail
tailf
termidx
test
tic
tickadj
tload
toe
top
tput
tset
tsort
tzselect
ul
unexpand
uptime
users
vim
vmstat
w
watch
whereis
write
xtrace
e2label
findfs
fsck.ext2
fsck.ext3
halt
hdparm
ifconfig
ifdown
ifup
init
insmod
klogd
logread
lsmod
mkfs.ext2
mkfs.ext3
modprobe
poweroff
reboot
rmmod
route
start-stop-daemon
swapoff
syslogd
udhcpc
badblocks
agetty
ctrlaltdel
blkid
blockdev
cfdisk
fsck.cramfs
debugfs
dumpe2fs
e2fsck
e2image
elvtune
fdisk
filefrag
fsck
iptables-restore
fsck.minix
hwclock
iptables
mkfs.bfs
mkfs
iptables-save
ldconfig
logsave
losetup
mke2fs
mkfs.ext4
mkfs.cramfs
mkfs.minix
mkswap
pivot_root
resize2fs
sfdisk
sln
swapon
sysctl
tune2fs
bunzip2
busybox.static
bzcat
bzcmp
bzegrep
bzfgrep
bzless
egrep
fgrep
gunzip
gzcat
hostname
ip
netstat
ping
rbash
rnano
run-parts
sed
sh
zcat
zcmp
zegrep
zfgrep
base64
arch
basename
busybox
bash
bb
bzip2recover
bzdiff
bzgrep
bzip2
dircolors
bzmore
cat
chattr
chgrp
chmod
chown
chroot
cksum
comm
cp
cut
date
dd
df
dir
sha224sum
dirname
dmesg
du
echo
env
expr
false
fuser
grep
gzexe
gzip
head
hostid
id
kill
killall
link
ln
logname
ls
lsattr
mkdir
mkfifo
mknod
more
mount
mv
nano
nice
nohup
oldfuser
printenv
ps
pstree
ptx
pwd
readlink
rm
rmdir
seq
sha256sum
sha384sum
sha512sum
shuf
sleep
sort
split
stat
stty
sync
tar
tee
touch
tr
true
tty
umount
uname
uniq
unlink
uuidgen
vdir
wc
who
whoami
yes
zdiff
zforce
zgrep
zless
zmore
znew
.ssh
install

答案1

tar cvzf - file1 file2 dir1 dir2 | ssh user@remotesystem "cat > /big/partition/rescue.tgz"

将是我的偏好。您甚至可以即时解压:

tar cvzf - file1 file2 dir1 dir2 | ssh user@remotesystem "cd /big/partition; tar xvzfp -"

但正如富埃罗指出的那样,人们也可以

rsync -avz -e "ssh user@remotesystem" dir1 dir2 remotesystem:/big/

(我的 rsync-fu 不是很好,所以上面的内容可能并不完美)。但你明白了;ssh可以用作任意数量事物的承载传输。

相关内容