#!/bin/bash
ftp_sitio=ftp://ip_delsitio
username=usuario
passwd=clave-acceso
backupdir=$HOME
filename="respaldo-$(date '+%F-%H%M').tar.gz"
echo "Creating a backup file $filename of $backupdir."
# Make a tar gzipped backup file
tar -cvzf "$filename" "$backupdir"
ftp -in
open $ftp_site
user $username $passwd
bin
put $filename #put sube get descarga
close
bye
No hay comentarios:
Publicar un comentario