BackupPC-users

Re: [BackupPC-users] Backup only new file(s)

2009-07-01 16:49:30
Subject: Re: [BackupPC-users] Backup only new file(s)
From: Mirco Piccin <pictux AT gmail DOT com>
To: "General list for user discussion, questions and support" <backuppc-users AT lists.sourceforge DOT net>
Date: Wed, 1 Jul 2009 22:44:27 +0200
Hi all,

> Every day (except sunday) a procedure stores in this folder a 120GB file.
> The name of the file is the day name.
>
> So, in a week, i have 6 different files generated (about 720 GB).
> Every week the files are overwritten by the procedure.
>
> I'd like to backup only the newest file, and not all the folder.

i've finally solved my problem, thanks to all (in particular to Les & Jeffrey).
The method is not perfect, but it works :-D.
Here the host pl file:

$Conf{XferMethod} = 'rsync';
$Conf{ClientNameAlias} = '127.0.0.1';
$Conf{FullPeriod} = '0.97';
$Conf{RsyncShareName} = [
  '/media/smbfs'
];
$Conf{BackupFilesOnly} = {
  '*' => [
    '/additional_path/filename.extension'
  ]
};
$Conf{RsyncClientCmd} = '$rsyncPath $argList+';
$Conf{RsyncClientRestoreCmd} = '$rsyncPath $argList+';
$Conf{DumpPreUserCmd} = '/bin/sh /usr/src/predump.sh
//10.0.5.3/tempshare $share /etc/backuppc/.smb_credentials
additional_path filename.extension';
$Conf{DumpPostUserCmd} = '/bin/sh /usr/src/postdump.sh $share
additional_path filename.extension';
$Conf{UserCmdCheckStatus} = '1';
$Conf{RestorePreUserCmd} = '/bin/sh /usr/src/mount_smbfs.sh
//10.0.5.3/tempshare $share /etc/backuppc/.smb_credentials';
$Conf{RestorePostUserCmd} = '/bin/sh /usr/src/umount_smbfs.sh $share';

(i've just changed from original host pl file:
additional_path : that's the directory in smb share where file to
backup is stored;
filename.extension : that's the chosen name for the file (the name
that will appear in browsing backup)
)

I've changed RsyncClientCmd and RsyncClientRestoreCmd (to make work locally).
I've created for DumpPreUserCmd a script; that script runs another 2 scripts:
- one to mount the remote share in the mount point defined ($share) -
(script used also in RestorePreUserCmd )
- one to rename the last modified file that is in mount point +
additional path as filename.extension; old file name is saved as .pid
empty file (that helps me also to verifiy if backup is running,....);

Then starts rsync backup.

I've than created for DumpPostUserCmd a script; that script runs
another 2 scripts:
- one to rename the filename.extension to original file name and
remove .pid file and
- one to umount the remote samba share (script used also in RestorePostUserCmd).

For smbmount/smbumount i've configured sudo for backuppc user.

In this way, i have always the same file name, and that file is always
the last one created (or edited).
If it could help, i can pastebin scripts created.

Regards
M

------------------------------------------------------------------------------
_______________________________________________
BackupPC-users mailing list
BackupPC-users AT lists.sourceforge DOT net
List:    https://lists.sourceforge.net/lists/listinfo/backuppc-users
Wiki:    http://backuppc.wiki.sourceforge.net
Project: http://backuppc.sourceforge.net/

<Prev in Thread] Current Thread [Next in Thread>
  • Re: [BackupPC-users] Backup only new file(s), Mirco Piccin <=