Attached to that mail comes a script that could be used on a daily
cronjob (or monthly), to get the yesterday tarballs.
#!/usr/bin/perl
#
# You are advised to avoid running this script with the root user.
#
# You should do something like
# $ adduser gnabak
# $ chmod o-rwx /home/gnaback
# $ su gnabak
# $ ssh-keygen -t dsa [empty passphrase]
#
# Copyright (c) 2004, Mathieu Roy
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
use strict;
my $user = "[EMAIL PROTECTED]";
my $there = "/backup/data";
my $here = "/home/gnabak";
my $yesterday = `date +%Y-%m-%d --date '1 day ago'`;
chomp($yesterday);
my @packages = ("ftp", "mail", "sql");
my @daily_packages;
for (@packages) {
push(@daily_packages, $_."_".$yesterday.".tar.gz");
}
for (@daily_packages) {
system("scp",
"$user:$there/$_",
"$here");
}
--
Mathieu Roy
+---------------------------------------------------------------------+
| General Homepage: http://yeupou.coleumes.org/ |
| Computing Homepage: http://alberich.coleumes.org/ |
| Not a native english speaker: |
| http://stock.coleumes.org/doc.php?i=/misc-files/flawed-english |
+---------------------------------------------------------------------+