Re: [BackupPC-users] BackupPC - restore not restoring file
On 07/07 01:59 , phil123456 wrote: > - it does not seem to contain any file(see below) wich is expectable since > there are no file in /var/backup on the client system Then choose a test which does have a file to restore. :) > - getting a tar file from the client to the master is the opposite of a > restore (???) To be clear I was using 'master' to mean the BackupPC server, and the 'client' to mean the machine being backed up. Sometimes the terms can be unclear. > on the backup master: > /usr/share/backuppc/bin/BackupPC_tarCreate -h hostname -n -1 -s /var/backup/ > /employees.sql > backup.tar > > tar tvf backup.tar > drwxr-xr-x root/root 4096 2016-07-05 08:52 ./ If as you say, there is not actually an employees.sql file, then this makes sense. -- Carl Soderstrom Systems Administrator Real-Time Enterprises www.real-time.com -- Attend Shape: An AT&T Tech Expo July 15-16. Meet us at AT&T Park in San Francisco, CA to explore cutting-edge tech and listen to tech luminaries present their vision of the future. This family event has something for everyone, including kids. Get more information and register today. http://sdm.link/attshape ___ BackupPC-users mailing list BackupPC-users@lists.sourceforge.net List:https://lists.sourceforge.net/lists/listinfo/backuppc-users Wiki:http://backuppc.wiki.sourceforge.net Project: http://backuppc.sourceforge.net/
Re: [BackupPC-users] BackupPC - restore not restoring file
On 07/06 12:26 , phil123456 wrote: > I really dont understand the usage of backuppc_createtar > > "-h host host from which the tar archive is created" > > but I want to create a restore from the master , not create a tar from a > remote host ...I am sorry, I really dont understand You're on the 'master' - the backup server. The -h is how you specify which host you want to do a restore of. I should have been more clear about what BackupPC_tarCreate gives you - it outputs a tar stream, which you then need to pipe or redirect into a file. So something like: /usr/share/backuppc/bin/BackupPC_tarCreate -h hostname -n -1 -s /var/backup/ employees.sql > employees.tar Then run 'tar tvf employees.tar' to see if you actually have the file(s) you're looking for. 'tar xvf employees.tar' will unpack the tarfile. There's probably GUI ways to do this, but there are so many of them and they change so often I can't say what to do. The point of this exercise is to make sure you can get your files out. Verify that you actually have your files. After that point you can worry about fancy things like restoring files into place. Personally, I don't allow the backup server to restore files into place. Makes me nervous to allow the backup server to clobber files on the client side. It's only a couple of commands to capture the tar stream on the server side, send it across the wire with 'netcat', then capture it on the other side with 'netcat' and pipe the result to tar and unpack the files. Here's a bit of documentation I wrote up a while ago on restoring files across the wire. This is good to know because restoring files in place may not always work for one reason or another. there may be some formatting brokenness since I copied it as plain text out of a wiki. === When restoring files from backuppc, it often happens that you want to restore many files, and don't want to download them from the web interface, due to limitations of bandwidth or file handling capability. For example, some operating systems have limits on how big the files may be, and some software may not operate on files larger than a certain size (4GB .zip files, for example). To bypass the user interface, use the BackupPC_tarCreate command on the command line. $ /usr/share/backuppc/bin/BackupPC_tarCreate --help /usr/share/backuppc/bin/BackupPC_tarCreate version [unknown] calling Getopt::Std::getopts (version 1.05 [paranoid]), running under Perl version 5.8.8. Usage: BackupPC_tarCreate [-OPTIONS [-MORE_OPTIONS]] [--] [PROGRAM_ARG1 ...] The following single-character options are accepted: With arguments: -e -h -n -p -r -s -b -w Boolean (without arguments): -L -l -t Options may be merged together. -- stops processing of options. Space is not required between options and their arguments. [Now continuing due to backward compatibility and excessive paranoia. See ``perldoc Getopt::Std'' about $Getopt::Std::STANDARD_HELP_VERSION.] usage: /usr/share/backuppc/bin/BackupPC_tarCreate [options] files/directories... Required options: -h host host from which the tar archive is created -n dumpNum dump number from which the tar archive is created A negative number means relative to the end (eg -1 means the most recent dump, -2 2nd most recent etc). -s shareNameshare name from which the tar archive is created Other options: -t print summary totals -r pathRemove path prefix that will be replaced with pathAdd -p pathAdd new path prefix -b BLOCKS BLOCKS x 512 bytes per record (default 20; same as tar) -w writeBufSz write buffer size (default 1048576 = 1MB) -e charset charset for encoding file names (default: value of $Conf{ClientCharset} when backup was done) -l just print a file listing; don't generate an archive -L just print a detailed file listing; don't generate an archive You will need to become the backuppc user on the backup server. To find the backup number (dumpNum), look at the web interface or in /var/lib/backuppc/pc/ and see the timestamps on the number directories. Some examples of usage This will take the last backup (number -1), the '/' share thereof, and the '/etc' subdirectory from that share, and redirect the resulting tar stream into a file called /var/tmp/host_example_com-etc.tar /usr/share/backuppc/bin/BackupPC_tarCreate -n -1 -h host.example.com -s / /etc > /var/tmp/host_example_com-etc.tar This example takes everything ('/') from the 'docs' share, and streams it to netcat, where it is directed at 'server' (which hopefully has a corresponding netcat process listening for the data). /usr/share/backuppc/bin/BackupPC_tarCreate -n -1 -h host.example.com -s docs / | nc server On the 'server' side of the above example, a command like this would recieve the data and dump it into the current director
Re: [BackupPC-users] BackupPC - restore not restoring file
The -h host is the hostname of the client that has been backed up as if there are multiple backups of hosts with the same file it needs to specify which one. So for example say you want to pull back share of /etc from a host I suspect you're looking to do something alone the lines of: /usr/share/backuppc/bin/BackupPC_tarCreate -h clientserver25 -n -1 -s /etc / > /tmp/etc.tar So in this -h clientserver25 refers to the name of a client you've already backed up that you wish to restore a tar file from as you may have countless clients with the same files and share names. -n -1 refers to the most recent backup copies of files be they incrementals or otherwise. You don';t need to worry about exact paths within the backups taken, Backuppc will figure that out for you, all you need to do is tell it to grab files/folders from either a specific numbered backup or (using a negative value) a copy taken relative to the most recent. -s is the share name as specified in that client's config. This is coming from $Conf{TarShareName} = '/etc'; or equivalent for the host you wish to restore from. The next forward slash means everything within that share and then redirect to a file as default is stdout. The documentation could probably use a few typical usage examples and man pages for the command line tools like this to save a bit digging around in archives of this list. Hope that helps Graham _ Graham Smith Technical Officer Department of Computing Institute of Technology Tallaght Tallaght Dublin 24 Ireland -Original Message- From: phil123456 [mailto:backuppc-fo...@backupcentral.com] Sent: 06 July 2016 08:26 To: backuppc-users@lists.sourceforge.net Subject: [BackupPC-users] BackupPC - restore not restoring file I really dont understand the usage of backuppc_createtar "-h host host from which the tar archive is created" but I want to create a restore from the master , not create a tar from a remote host ...I am sorry, I really dont understand besides the command used for the restore is really close to rsync for backup : /usr/bin/ssh -q -x -l backuppc alderaan /usr/bin/rsync --server --sender --numeric-ids --perms --owner --group -D --links --hard-links --times --block-size=2048 --recursive --ignore-times . /var/backup/ so for restore, it should be something similar +-- |This was sent by philippe.flor...@edenred.com via Backup Central. |Forward SPAM to ab...@backupcentral.com. +-- -- Attend Shape: An AT&T Tech Expo July 15-16. Meet us at AT&T Park in San Francisco, CA to explore cutting-edge tech and listen to tech luminaries present their vision of the future. This family event has something for everyone, including kids. Get more information and register today. http://sdm.link/attshape ___ BackupPC-users mailing list BackupPC-users@lists.sourceforge.net List:https://lists.sourceforge.net/lists/listinfo/backuppc-users Wiki:http://backuppc.wiki.sourceforge.net Project: http://backuppc.sourceforge.net/ The contents and any attachment of this e-mail are private and confidential. They are intended only for the use of the intended addressee. If you are not the intended addressee, or the person responsible for delivering it to the intended addressee, you are notified that any copying, forwarding, publication, review or delivery of this e-mail or any attachments to anyone else or any other use of its contents is strictly prohibited. You are prohibited from reading any part of this e-mail or any attachments. If you have received this e-mail in error, please notify the system manager. Unauthorised disclosure or communication or other use of the contents of this e-mail or any part thereof may be prohibited by law and may constitute a criminal offence. Internet e-mails are not necessarily secure. The Institute does not accept responsibility for changes made to this message after it was sent. Unless stated to the contrary, any opinions expressed in this message are personal to the author and may not be attributed to the Institute. -- Attend Shape: An AT&T Tech Expo July 15-16. Meet us at AT&T Park in San Francisco, CA to explore cutting-edge tech and listen to tech luminaries present their vision of the future. This family event has something for everyone, including kids. Get more information and register today. http://sdm.link/attshape ___ BackupPC-users mailing list BackupPC-users@lists.sourceforge.net List:https://lists.sourceforge.net/lists/listinfo/backuppc-users Wiki:http://backuppc.wiki.sourceforge.net Project: http://backuppc.sourceforge.
Re: [BackupPC-users] BackupPC - restore not restoring file
On 07/05 12:28 , phil123456 wrote: > on restore, it says it is successfull, but the file is not on the host > and it says there is 1 xferErrs but as I check all the logs, no additional > entries are saying what could go wrong > > 2016-07-05 09:21:31 restore started below directory /var/backup/ to host > hostname > 2016-07-05 09:21:31 restore 0 complete (1 files, 1917 bytes, 0 dirs, 1 > xferErrs) > > also I cant figure out what is the command executed and debug it since it is > not in the log either Presuming that you are using a Debian-like installation, try this command: /usr/share/backuppc/bin/BackupPC_tarCreate -h -n -1 -s /path/to/your/files all on one line of course. For help with what the options mean, just run: /usr/share/backuppc/bin/BackupPC_tarCreate (i.e. with no arguments after the command itself) Note that you need to be running as the 'backuppc' user to do this. So I log in as an ordinary user, then do 'sudo -' to become root, then 'su - backuppc'. -- Carl Soderstrom Systems Administrator Real-Time Enterprises www.real-time.com -- Attend Shape: An AT&T Tech Expo July 15-16. Meet us at AT&T Park in San Francisco, CA to explore cutting-edge tech and listen to tech luminaries present their vision of the future. This family event has something for everyone, including kids. Get more information and register today. http://sdm.link/attshape ___ BackupPC-users mailing list BackupPC-users@lists.sourceforge.net List:https://lists.sourceforge.net/lists/listinfo/backuppc-users Wiki:http://backuppc.wiki.sourceforge.net Project: http://backuppc.sourceforge.net/