Discussion:
[BackupPC-devel] Feature request: exec type backup
higuita
2015-03-04 02:47:01 UTC
Permalink
Hi

I love backuppc, is very flexible and works very well... but i
miss one feature: Exec backup type

I want to execute a remote script to do a backup. The backup will
not be store in backuppc, so all i need is to execute a script and save
the status and the script log.

Right now i workaround with tar, i replace the tar command
with a script that will execute my command and then tars the log, so
backuppc can see the backup status and a user can checkout the log.
It works, but is a pain to have to play with tar command, the full
and incremental options to do what i need.

A simple ssh $host $script $options would be perfect, where
the $options get their parameters from the full and incremental
backup. Restore could also be a script. The script status code and
stdout and stderr should be captured and logged by backuppc. No files
are transfered to backuppc, so the size for this type of backups could
always be zero in the status (or show it inside a [], to flag a remote
backup)

With this, one could use backuppc as the only interface for
all backups. This is useful specially on remote machines with very slow
network, where one must backup to a local HD/NAS. This could also open the
door for user to use tapes, dvd burners and interact with other backup
softwares

Please consider adding this.

Best regards,
higuita
--
Naturally the common people don't want war... but after all it is the
leaders of a country who determine the policy, and it is always a
simple matter to drag the people along, whether it is a democracy, or
a fascist dictatorship, or a parliament, or a communist dictatorship.
Voice or no voice, the people can always be brought to the bidding of
the leaders. That is easy. All you have to do is tell them they are
being attacked, and denounce the pacifists for lack of patriotism and
exposing the country to danger. It works the same in every country.
-- Hermann Goering, Nazi and war criminal, 1883-1946
Les Mikesell
2015-03-04 05:03:31 UTC
Permalink
Post by higuita
Hi
I love backuppc, is very flexible and works very well... but i
miss one feature: Exec backup type
I want to execute a remote script to do a backup. The backup will
not be store in backuppc, so all i need is to execute a script and save
the status and the script log.
Right now i workaround with tar, i replace the tar command
with a script that will execute my command and then tars the log, so
backuppc can see the backup status and a user can checkout the log.
It works, but is a pain to have to play with tar command, the full
and incremental options to do what i need.
A simple ssh $host $script $options would be perfect, where
the $options get their parameters from the full and incremental
backup.
You should be able to use the DumpPreUserCmd for that, then perhaps
back up a directory containing the log of the operation. You'd get
scheduling and the ability to see failures in one place.
Post by higuita
Restore could also be a script. The script status code and
stdout and stderr should be captured and logged by backuppc. No files
are transfered to backuppc, so the size for this type of backups could
always be zero in the status (or show it inside a [], to flag a remote
backup)
Not sure how you would control what was restored, though.
--
Les Mikesell
***@gmail.com

------------------------------------------------------------------------------
Dive into the World of Parallel Programming The Go Parallel Website, sponsored
by Intel and developed in partnership with Slashdot Media, is your hub for all
things parallel software development, from weekly thought leadership blogs to
news, videos, case studies, tutorials and more. Take a look and join the
conversation now. http://goparallel.sourceforge.net/
_______________________________________________
BackupPC-devel mailing list
BackupPC-***@lists.sourceforge.net
List: https://lists.sourceforge.net/lists/listinfo/backuppc-devel
Wiki: http://backuppc.wiki.sourceforge.net
Project: http://backuppc.sourceforge.net/
higuita
2015-03-10 23:53:54 UTC
Permalink
Hi
Post by Les Mikesell
Post by higuita
I want to execute a remote script to do a backup. The backup
will not be store in backuppc, so all i need is to execute a script
and save the status and the script log.
Right now i workaround with tar, i replace the tar command
with a script that will execute my command and then tars the log, so
(...)
Post by Les Mikesell
You should be able to use the DumpPreUserCmd for that, then perhaps
back up a directory containing the log of the operation. You'd get
scheduling and the ability to see failures in one place.
This is also a workaround, just like mine with tar :)

They work, but i think a simple "exec" backup type could be
useful for more people and should be simple to implement as almost
everything is already there.

The fun of it is that is very powerful and flexible and can be
used and abused in ways we can even imagine.
Post by Les Mikesell
Post by higuita
Restore could also be a script. The script status code and
stdout and stderr should be captured and logged by backuppc. No files
are transfered to backuppc, so the size for this type of backups could
always be zero in the status (or show it inside a [], to flag a remote
backup)
Not sure how you would control what was restored, though.
Just execute the restore script. backuppc will just have the
logs of the "exec" backup, so the user will have also create a restore
script for what he wants. A CD/DVD will require one thing, a remote
rsynced HD will require other and a other yet for any other special
backup program.

Maybe the remote backup script could report a list of
files stored in the log and the restore could also take a file list
as argument... but this should be optional and maybe with a regexp
option to extract that file list (as each script could generate different
logs)

Either way, the only required thing is the restore script
and one option for the backup number and/or date of the selected backup.
More elaborated backups and restores require the admin to proper
configure the scripts

Thanks

higuita
--
Naturally the common people don't want war... but after all it is the
leaders of a country who determine the policy, and it is always a
simple matter to drag the people along, whether it is a democracy, or
a fascist dictatorship, or a parliament, or a communist dictatorship.
Voice or no voice, the people can always be brought to the bidding of
the leaders. That is easy. All you have to do is tell them they are
being attacked, and denounce the pacifists for lack of patriotism and
exposing the country to danger. It works the same in every country.
-- Hermann Goering, Nazi and war criminal, 1883-1946
Loading...