Jon Forrest wrote:
Les Mikesell wrote:

I don't think tar is capable of transferring a directory listing without the contents of the files. Since it runs over ssh you could run some other command, but the command isn't guaranteed to exist or to be permitted by the sshd config at the other end.

If 'tar' is permitted by the remote 'sshd' config then I don't
see the danger of also allowing '/bin/ls', especially since
only the backuppc user on the local system would be allowed
to initiate a remote '/bin/ls'. If the right command isn't
'/bin/ls' then there could be a BPC client-specific configuration
option with the correct command.


Maybe one way to get a directory listing with tar.....

run 2 tar commands.

First....

tar -cvf /dev/null

then you can pipe the output anywhere you like.

Then run the real tar.


I do this with tape backups to get a before listing to compare with what it writes.

/bin/tar -cvf /dev/null --totals --exclude-from "$EXCLUSIONLIST" --ignore-failed-read . 1> ${LOGDIR}/${FULLLIST} 2> ${LOGDIR}/${TOBEDONE} /bin/tar -cvf /dev/st0 --totals --exclude-from "$EXCLUSIONLIST" --ignore-failed-read . 1> ${LOGDIR}/${WRITELIST} 2>> ${LOGDIR}/${BACKUPLOG}

the tar to /dev/null actually doesn't take that long at all, maybe a few minutes depending on the size.

Regards,

Les
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
BackupPC-users mailing list
BackupPC-users@lists.sourceforge.net
List:    https://lists.sourceforge.net/lists/listinfo/backuppc-users
Wiki:    http://backuppc.wiki.sourceforge.net
Project: http://backuppc.sourceforge.net/

Reply via email to