Backup System

chatwizrd

Verified User
Joined
Jul 3, 2005
Messages
1,915
I was wondering if it is possible to setup to backup the system to local disk and also to offsite ftp with the backup system?

I would like something that can do both. I know I probably could just run a 2nd cron with a diff config if I have to.

Would be nice to do both though :)
 
I think the admin level backup (sysbak) will make a local copy and then ftp it to a remote server if you check the box. I haven't tested but from the configuration it appears that a local copy is made whether or not the remote transfer box is selected.

To the best of my knowledge it is not possible with the other backup options such as reseller or user level backups.
 
sysbk can be set to what you want to do; make sure you're not deleting backup from the server (but you may want to move it later, either with a script or manually), and that you're NOT using incremental backup.

To do it for the user/reseller backups, simply back it up to your own server, then create a script and a cronjob to copy it to another system.

Jeff
 
Hi there,

I wasn't sure where to post this, but I found this thread on remote back-up.

In my control panel I marked the remote back-up option and selecte scp as the method. I entered valid user/pass combination on a remote server.

To make sure the key was already in the known_hosts file I manually made an SSH connection to this server to accept the key.

OK, now the problem is that it does not work. No remote back-up but also no errors is de /directadmin/error.log.

I can't find what it tries to do because the /directadmin/scripts/sysbk.sh does not seem to be the script running the systemback-up...

So questions to any who have an answer:

- which script actually runs the back-up (so I can see what it does)

- in which log would remote back-up errors appear?

- does DA run the backup as user dadmin, or root, or some other user? Maybe I need to log in as THAT user for the first time to accept the right SSH-key. Where would the dadmin user's known_hosts be stored, since it doesn't have a homedir...??

Thanks, once again, for your input!

Harro

<edit> dadmin DOES have a homedir... let's run the back-up now that I added the remote key manually as user dadmin! </edit>
 
Last edited:
Check logs on the destination servers to see if the connection is even being made.

Try an ftp connection manually from the server being backed up. Try to log in using the login name the backup program is using. Try moving to the right directory. Try uploading a file.

See if you have any problems.

Jeff
 
I'm trying to use scp, NOT ftp.
Manually, scp works fine with username, login and path defined on DirectAdmin interface.
Nothing on /var/log/messages on both sides.
What is the username used by DirectAdmin for scp? DirectAdmin shouldn't say "tranfer completed" :s
 
Hello,

I'm not too sure why the sysbk script would claim it's transferred if it isn't.
Try running it manually to see if you can see any other info about the problem:
Code:
cd /usr/local/sysbk
./sysbk -s
and watch for any errors.

For even more debugging, you can disable the pipe to /dev/null and the "quiet" so you can see exactly what scp is doing. To do that, edit /usr/local/sysbk/internals/internals.sysbk.
There should be 2 lines
Code:
$SCP [b]-qrCp[/b] -i $PRVID_FILE $RTFILE $SCP_USER@$SCP_HOST:$SCP_RPATH/$DPREFIX [b]>> /dev/null 2>&1[/b]
and
Code:
$SCP [b]-qrCp[/b] -i $PRVID_FILE $BACKUP_PATH/$DATE $SCP_USER@$SCP_HOST:$SCP_RPATH
For both lines, change:
-qrCp
to
-rCp

For the first line, remove:
>> /dev/null 2>&1

Then run it manually again to check for errors.

John
 
Thank you John for your post.

cd /usr/local/sysbk
./sysbk -s

When I do this, the system asks me for my password and it works fine! I've checked the password on DirectAdmin interface twice and it's correct.
Are we getting closer?
 
After adding id_dsa.pub (DirectAdmin server) to .ssh/authorized_keys (on backup server) the system started to work!
Thank you for your help!
 
Back
Top