mirror of
https://github.com/lucaspalomodevelop/core.git
synced 2026-03-16 01:24:38 +00:00
15 lines
261 B
Bash
Executable File
15 lines
261 B
Bash
Executable File
#!/bin/sh
|
|
|
|
BACKUPFILE="/conf/netflow.tgz"
|
|
BACKUPDIR="/var/netflow"
|
|
|
|
if [ "${1}" == "restore" ]; then
|
|
if [ -f "${BACKUPFILE}" ]; then
|
|
tar -C / -xzf "${BACKUPFILE}"
|
|
fi
|
|
else
|
|
if [ -d "${BACKUPDIR}" ]; then
|
|
tar -C / -czf "${BACKUPFILE}" "${BACKUPDIR}"
|
|
fi
|
|
fi
|