location of some files for system backup

User avatar
rgmhtt
Posts: 421
Joined: Sun Jan 11, 2009 9:26 am

location of some files for system backup

Postby rgmhtt » Wed Feb 16, 2011 9:32 pm

Since I lost so much (data, time, energy) in my harddrive failure (Ontrack sent it to their clean room so that shows it is bad), I am FINALLY developing an RSYNC-based backup scheme. I have a USB attached drive, so rsync run via cron is an easy solution. Provided you know what to back up! So far in my /etc/crontab I have:

Code: Select all

1 4 * * * root /usr/bin/rsync -a /home/ /media/2GHJTCB4/backups/hda/home 7 3 * * * root /usr/bin/rsync -a --delete /var/hda/files/ /media/2GHJTCB4/backups/hda/files 5 2 * * * root /usr/bin/rsync -a --backup /etc/ /media/2GHJTCB4/backups/hda/etc
I may add backing up /root to this, or in a onetime thing.

I learned how to get the local SID for Samba by:

Code: Select all

net getlocalsid > localsid.txt
but this is a onetime backup item that I would then push into a new server with

Code: Select all

net setlocalsid <localsid>
But there is the mysql database to back up as well. Where is that located?

And is there anything else I should consider backing up?

User avatar
bigfoot65
Project Manager
Posts: 11867
Joined: Mon May 25, 2009 4:31 pm

Re: location of some files for system backup

Postby bigfoot65 » Thu Feb 17, 2011 5:42 am

Why not just use the AutoMySQLBackup script to capture everything. It grabs all app dbs and the production db as well.

See http://wiki.amahi.org/index.php/Database_Backup. Then you can selectively restore the dbs needed.
ßîgƒσστ65
Applications Manager

My HDA: Intel(R) Core(TM) i5-3570K CPU @ 3.40GHz on MSI board, 16GB RAM, 1TBx1+2TBx2+4TBx2

User avatar
rgmhtt
Posts: 421
Joined: Sun Jan 11, 2009 9:26 am

Re: location of some files for system backup

Postby rgmhtt » Thu Feb 17, 2011 7:54 am

This will be more sophisticated than I have implemented, and I will look into it, though I will still need to rsync the dbbackup directory. Here is what I figured out and put in place today (in /etc/crontab):

Code: Select all

15 2 * * * root /usr/bin/rsync -ah --stats --backup --delete /var/lib/mysql/ /media/2GHJTCB4/backups/hda/mysql
I figured out I needed to add the --stats option to the rsync to insure I get report emails. If the rysnc has nothing to report (eg errors), it does not generate an email to root. And -h just makes the numbers in --stats readable.

User avatar
rgmhtt
Posts: 421
Joined: Sun Jan 11, 2009 9:26 am

Re: location of some files for system backup

Postby rgmhtt » Thu Feb 17, 2011 8:43 am

Why not just use the AutoMySQLBackup script to capture everything. It grabs all app dbs and the production db as well.

See http://wiki.amahi.org/index.php/Database_Backup. Then you can selectively restore the dbs needed.
The wget in the instructions did not work for me, I got a 404. I had to go directly to sourceforge and download the script via their standard web interface :(

Who is online

Users browsing this forum: No registered users and 1 guest