Koozali.org: home of the SME Server

Obsolete Releases => SME 7.x Contribs => Topic started by: pauljclarke on December 29, 2007, 09:01:43 PM

Title: Backuppc and second hard drive added
Post by: pauljclarke on December 29, 2007, 09:01:43 PM
I have Backuppc running on my SME7.2 box and yesterday I added a USB hard disk as the main drive is only 20Gb and new drive is 250Gb.

New drive is mounted to /.../ibays/backup_pc/files/

I wanted backuppc to use this drive to store the backups.

1: first I stopped backuppc
2: using Midnight Commander I copy all hosts to new drive "/../pc"
3: removed all host files from /opt/backuppc/files/pc/.. and also the pc directory
4: created sym-ln to new area on new hard drive. ie /opt/backuppc/files/pc -> ...ibays/back.../pc
5: chmod'ed all files in new area '777'
6: started backuppc

Problem is that backuppc now can't see any of the old backups and when asked to run a new backup it just failes without any error and returns to idle...

Code: [Select]
Update - following log entry found...?
2007-12-29 20:00:10 localhost: mkdir /opt/backuppc/files/pc: File exists
 at /usr/local/BackupPC/bin/BackupPC_dump line 193

Any ideas?

P  :-?
Title: Re: Backuppc and second hard drive added
Post by: Daniel B. on December 30, 2007, 04:19:17 PM
Hi.
Moving the pool of backuppc is a quite complex problem, because it uses a lot of hardlinks. What you should do:
- stop backuppc to be sure the data are statics
- format your new drive (be sure you don't have any data on it)
- mount it in a temp directory, for example /mnt/newdrive
- copy the data with this command:
Code: [Select]
cp -a /opt/backuppc/* /mnt/newdrive

This may be very long, depending on the amount of data, the number of backups, the number of files in each backup etc..., so don't worry if it takes several hours

Now umount the old drive
Code: [Select]
umount /opt/backuppc or move the directory backuppc if the old drive was the main one
Code: [Select]
mv /opt/backuppc /opt/backuppc.old
mkdir /opt/backuppc
chown backuppc:backuppc /opt/backuppc

Now umount the new drive from the temp directory and mount it in /opt/backuppc, and eventually, restart backuppc, it should be fine.

This method works for small backup pool (here you have less than 20GB), for bigger pool, I've written some scripts to move the pool to a new harddrive, or to another host, but there're some bugs in the current release (3.0-1), it will be corrected in the next one, based on backuppc 3.1
Title: Re: Backuppc and second hard drive added
Post by: pauljclarke on December 31, 2007, 05:37:19 PM
Hi,

Having followed your instructions all seamed well however /backuppc in the service-manager just gave me broken links - think I broke it before I got your advice!?

However I did a uninstall of Backuppc and cleaned out all the files/folders and re-installed - all is working fine even if I did dump my old backups  :-?

Thanks

P :-)
Title: Re: Backuppc and second hard drive added
Post by: PatchPanel on January 06, 2008, 01:24:32 PM
Hi,

being a Linux novice novice overall I am trying to get backuppc running without any errors
on a separate harddrive.

The harddrive is mounted under /mnt/backupdrive.
I could ran a full backup of localhost but got 352 XFER errors:

Quote
2008-01-05 03:37:11 Finished full backup on localhost
2008-01-05 03:37:11 Running BackupPC_link localhost (pid=22880)
2008-01-05 03:37:12 BackupPC_link got error -4 when calling MakeFileLink(/mnt/backupdisk/backuppc/files/pc/localhost/0/f%2f/f.rnd, 06f4ad5a28727c7eb72e23b54ebc0da4, 1)
2008-01-05 03:37:12 BackupPC_link got error -4 when calling MakeFileLink(/mnt/backupdisk/backuppc/files/pc/localhost/0/f%2f/faquota.group, 2a8ebe163f4453f9f271475df360f444, 1)
2008-01-05 03:37:12 BackupPC_link got error -4 when calling MakeFileLink(/mnt/backupdisk/backuppc/files/pc/localhost/0/f%2f/faquota.user, 2d44e6c793d3447e9f9e89b2559c16d8, 1)
2008-01-05 03:37:12 BackupPC_link got error -4 when calling MakeFileLink(/mnt/backupdisk/backuppc/files/pc/localhost/0/f%2f/fbin/farch, 5657bdfb55d0e41a430d59c2cd09ce34, 1)
2008-01-05 03:37:12 BackupPC_link got error -4 when calling MakeFileLink(/mnt/backupdisk/backuppc/files/pc/localhost/0/f%2f/fbin/fawk, d8ab96d0dc844304ce7ac1aa05cb2e9c, 1)
2008-01-05 03:37:12 BackupPC_link got error -4 when calling MakeFileLink(/mnt/backupdisk/backuppc/files/pc/localhost/0/f%2f/fbin/fbasename, f305eb0e33c610f5fd9b598a333b9c95, 1)
...
I read something about softlinking the /pool but could not fix it.


Following your advice I would also move all the folders
under /opt/backuppc i. e. /cgi-bin, /files, /images.
Under /files/etc there are also the config-files and I wonder -if I understand that right- why to move also those files ?
I would like to have only the backup data stored on the extra hard drive.


Thanks for your help.


best regards
PatchPanel
Title: Re: Backuppc and second hard drive added
Post by: Daniel B. on January 06, 2008, 04:09:32 PM
You need to mount the backup drive in /opt/backuppc (or link your backup drive to this directory with ln -s /mnt/backupdrive /opt/backuppc) before you install the contrib. just uninstall it and re-install. It should work then

Cheers
Title: Re: Backuppc and second hard drive added
Post by: PatchPanel on January 07, 2008, 12:25:17 AM
Thanks a lot,

that is looking much better.
(However I still receive 23 xfer errors)


best regards
PatchPanel