Linode Forum
Linode Community Forums
 FAQFAQ    SearchSearch    MembersMembers      Register Register 
 LoginLogin [ Anonymous ] 
Post new topic  Reply to topic
Author Message
PostPosted: Tue Apr 23, 2013 9:25 am 
Offline
Senior Member

Joined: Wed Jan 21, 2009 7:13 pm
Posts: 126
Location: Portugal
Hi,

I know Amanda and Bacula but was looking for something lighter and simple to backup 2 or 3. Vps to one server.
I would like to find a client/server solution to avoid passwordless solutions like rsync/rdiff/rsnapshoot.

Is there something like this in the open souce world?

Thanks

N.


Top
   
PostPosted: Tue Apr 23, 2013 9:53 am 
Offline
Senior Member

Joined: Sun May 23, 2010 1:57 pm
Posts: 315
Website: http://www.jebblue.net
Here's my script using rsync, it can backup a whole system, after the initial backup, rsync backups are fast:

Code:
#!/bin/sh

#[Note: This is a FULL system backup script and requires root. If you
# only want to backup your user files then tailor the script.]
# Use "sudo crontab -e" to set up a cron job to run it.
#
#[Note: --delete will remove target files and dirs that no longer exist in
# the source, you may or may not want this sync'ing.]
#
#[Note: The first backup will take a while, to add the files to the
# target, after that it should only take a matter of minutes.]
#
#[Note: rsync must be installed on the source and the target.]
#

BINPRE="rsync -r -t -p -o -g -v -l -D --delete"
SSH="-e ssh -p 22"
BINPOST="<target_user>@<target_host_ip>:/<target_backup_dir>"
EXCLUDES="--exclude=/mnt --exclude=/tmp --exclude=/proc --exclude=/dev "
EXCLUDES=$EXCLUDES"--exclude=/sys --exclude=/var/run --exclude=/srv "
EXCLUDES=$EXCLUDES"--exclude=/media "

date >> /root/start

$BINPRE "$SSH" / $EXCLUDES $BINPOST

date >> /root/stop


This cron entry will run it at 1 AM for you:

Code:
# m h  dom mon dow   command
0 1 * * * /root/bin/backup.sh > /root/backup.log 2>&1


Top
   
PostPosted: Tue Apr 23, 2013 10:08 am 
Offline
Senior Member

Joined: Sun Mar 07, 2010 7:47 pm
Posts: 1970
Website: http://www.rwky.net
Location: Earth
Note if you're running a database such as mysql you'll want to run mysqldump first or you may end up with a backup with an database in an inconsistent state.

Or if you feel like something more advanced you can use lvm snapshots but that requires fiddling with your partition setup.

_________________
Paid support
How to ask for help
1. Give details of your problem
2. Post any errors
3. Post relevant logs.
4. Don't hide details i.e. your domain, it just makes things harder
5. Be polite or you'll be eaten by a grue


Top
   
PostPosted: Tue Apr 23, 2013 6:49 pm 
Offline
Senior Member

Joined: Sun May 23, 2010 1:57 pm
Posts: 315
Website: http://www.jebblue.net
obs wrote:
Note if you're running a database such as mysql you'll want to run mysqldump first or you may end up with a backup with an database in an inconsistent state.

Or if you feel like something more advanced you can use lvm snapshots but that requires fiddling with your partition setup.


Yep, I could have posted that, was in a hurry, here's my two cron lines minus the times, that do my MySQL and Postgres backups on a not to interfere basis with the rsync backup (I think I found that tr stuff for constructing a filename on these forums):

Code:
/usr/bin/mysqldump -u root -ppassword --all-databases | gzip > /root/databasebackups-mysql/database_"`date | tr \" \" \"-\"`".sql.gz

/usr/bin/pg_dumpall -h localhost -U postgres | gzip > /root/databasebackups-postgres/database_"`date | tr \" \" \"-\"`".sql.gz


FYI for the reader, you'll want to set up a .pgpass file.


Top
   
PostPosted: Wed Apr 24, 2013 7:31 am 
Offline
Senior Member
User avatar

Joined: Thu Jul 12, 2012 3:55 pm
Posts: 133
Website: http://www.amitywebsolutions.co.uk
Here's the script we use, we wrote it from a series of other online scripts...
https://gist.github.com/amityweb/4251879

We specifically wanted an incremental backup with 14 day retention

We have not actually tested this script as it is in this form, we have may servers and call this script from another script that passes server details as arguments, so I adapted this to assume its used for one server, so hope it works OK!

The general backup process works well for us, had done for a long time. We use it to backup to our office server, as a secondary backup solution in addittion to hosts backups.

_________________
Web Development Agency in South Wales


Top
   
PostPosted: Wed Apr 24, 2013 11:14 am 
Offline
Senior Member

Joined: Wed Jan 21, 2009 7:13 pm
Posts: 126
Location: Portugal
Thanks for you suggestions :)

I was looking for something more like Bacula (client/server) to avoid connections using ssh keys.
I don't know if this exists but was trying to find!


Top
   
PostPosted: Wed Apr 24, 2013 11:23 am 
Offline
Senior Newbie

Joined: Wed Jun 29, 2011 12:32 pm
Posts: 7
Website: http://www.somersettechsolutions.co.uk
WLM: anthony@somersettechsolutions.co.uk
AOL: anthonysomerset
Location: London, UK
best client/server solution i know of is Idera CDP its priced at $20 per VM the only downside is the server is a Java based system so can be memory intensive (2-4gb RAM minimum required)

it can handle mysql consistently if you configure it without mysqldumps needing to be taken before backup and they way it backs up, you could run it hourly on reasonably busy systems without impact and it only transmits changed blocks

only other downside with linode VM's (and any other Xen PV hosts) is that you cant really do block level restore only file or db's which is slower


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic


Who is online

Users browsing this forum: No registered users and 4 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
RSS

Powered by phpBB® Forum Software © phpBB Group