laurent22 / rsync-time-backup

Time Machine style backup with rsync.
3.38k stars 446 forks source link

support of sed for busybox? #187

Closed mrPsycho closed 4 years ago

mrPsycho commented 4 years ago

Hello!

i'm tryuong to run your script on busybox (on router with usb drive), and see this:

sed: invalid option -- E
BusyBox v1.20.2 (2017-09-22 20:15:53 WEST) multi-call binary.

Usage: sed [-inr] [-f FILE]... [-e CMD]... [FILE]...
or: sed [-inr] CMD [FILE]...

        -e CMD  Add CMD to sed commands to be executed
        -f FILE Add FILE contents to sed commands to be executed
        -i      Edit files in-place (else sends result to stdout)
        -n      Suppress automatic printing of pattern space
        -r      Use extended regex syntax

If no -e or -f, the first non-option argument is the sed command string.
Remaining arguments are input files (stdin if none).

as i understand -E is a newer replacement for -r. am i right?

mrPsycho commented 4 years ago

also, i'm trying to use native rsync protocol: $ /ffp/bin/bash /mnt/md0/Users/backuper/scripts/rsync_tmbackup.sh rsync://backup@x.y.z.20/files /home/backuper/files

and see, that it tries to check SOURCE without any actual check... so, i commented it, and it passed.

then i see this:

df: invalid option -- T
BusyBox v1.20.2 (2017-09-22 20:15:53 WEST) multi-call binary.

Usage: df [-Pkmh] [FILESYSTEM]...

Print filesystem usage statistics

        -P      POSIX output format
        -k      1024-byte blocks (default)
        -m      1M-byte blocks
        -h      Human readable (e.g. 1K 243M 2G)

df: invalid option -- T
BusyBox v1.20.2 (2017-09-22 20:15:53 WEST) multi-call binary.

Usage: df [-Pkmh] [FILESYSTEM]...

Print filesystem usage statistics

        -P      POSIX output format
        -k      1024-byte blocks (default)
        -m      1M-byte blocks
        -h      Human readable (e.g. 1K 243M 2G)

ps: invalid option -- p
BusyBox v1.20.2 (2017-09-22 20:15:53 WEST) multi-call binary.

Usage: ps [-o COL1,COL2=HEADER] [-T]

Show list of processes

        -o COL1,COL2=HEADER     Select columns for display
        -T                      Show threads
mrPsycho commented 4 years ago

ok, for me i did this:

changed: ps -p "PID" -o command | grep "APPNAME" to ps | grep "PID" | grep "APPNAME" and df -T to simple df, cause it can't show fs type. and it looks like it works.