Backing up my server question

General support questions
Post Reply
northpoint
Posts: 107
Joined: 2016/05/23 11:57:12

Backing up my server question

Post by northpoint » 2017/11/09 17:01:52

Bit of a noob as far as 'best practices' goes. However, I have a couple of questions on backing up a production server I am building.

Hardware: Dell T610 - AD and filesharing centos7.4
Dell Ultrium LT0-5 tape drive 1.5/3tb.
VM - Windows7 pro
Raid1 - Mirrored system
Raid5 - Company data

Right now I have a bash script that backs up the data raid. The script uses rsync and runs once a night. I wrote another script to shutdown the vm and export to an appliance this happens once a week on the weekend.

Before I sat down and wrote my scripts I looked around for a simple GUI to do this for me. Then I thought to ask here.

I can get a long with my bash scripts I guess but I want to ask how everyone here is doing backups. I have been looking over Amanda and currently I just tar things up to the tape drive. What would be good for a single server backup besides what I am doing?
Ryzen x1800 * Asus x370 Pro * CentOS 7.4 64bit / Icewarp /

tunk
Posts: 1206
Joined: 2017/02/22 15:08:17

Re: Backing up my server question

Post by tunk » 2017/11/09 18:36:05

- do you store the tapes off site? Just in case of fire, flooding, thiefs, etc.
- do you make a backup of system settings (/etc and so on)? In case of a system crash that may speed up a reinstall.
- have you checked that you can read the tapes and recover everything?
- you may also consider from time to time doing an additional backup to an external USB-disk (and move it off-site).

MartinR
Posts: 714
Joined: 2015/05/11 07:53:27
Location: UK

Re: Backing up my server question

Post by MartinR » 2017/11/09 18:53:52

Watch out with virtual machines and storage. If the VMs access their own partitions, then the host will usually not have them mounted, and so they will not be backed up. If the VMs use virtual disks in a host file, then the smallest of changes will make the host file liable to be backed up. If you are running Amanda I would suggest setting it up so that the VMs send their own backups back to the host machine and don't let the host try to backup the VMs disks. Of course, if you are running a cluster aware filesystem like gfs2 then there is not a problem - but I doubt that Windows could use such a beast.

northpoint
Posts: 107
Joined: 2016/05/23 11:57:12

Re: Backing up my server question

Post by northpoint » 2017/11/09 19:25:39

Thank you very much for the replies,

The backup tape will be stored off site. There will also be a rsynced backup to a separate raid5 on the server. So, I have that covered :)
I first do an rsync to a directory on the raid5 device. Then that directory is written to tape. This insures that individual files can be restored quickly. In case of something happening to the raid5 we can always restore from an off site tape.

The windows vm is only there to host some 3rd party software. I will be setting up a backup daily to a subdirectory of the main backup directory. So, This will basically get backed up the same way. Also the vm will be exported about every weekend.

I use tar of course for the tape drive and rsync for the local backup.

I mentioned Amanda because its one of the few I think I read that it will work with a tape drive and wanted to know how others are backing up to tape and if its better than what Im doing now.

Thanks again,

Northpoint
Ryzen x1800 * Asus x370 Pro * CentOS 7.4 64bit / Icewarp /

pjsr2
Posts: 614
Joined: 2014/03/27 20:11:07

Re: Backing up my server question

Post by pjsr2 » 2017/11/09 19:38:59

As this is a production server, you should think carefully which files may be in use while you are copying them for backup. Are there contents ending up in a usable and meaningful state in your backup?

A database server for example may not have yet flushed all the latest changes to the files when you are copying the files; the database file and the transaction log file may not be in a consistent state with respect to each other. This could make it impossible to load your database from the backup copies.

northpoint
Posts: 107
Joined: 2016/05/23 11:57:12

Re: Backing up my server question

Post by northpoint » 2017/11/09 19:55:34

pjsr2 wrote:As this is a production server, you should think carefully which files may be in use while you are copying them for backup. Are there contents ending up in a usable and meaningful state in your backup?

A database server for example may not have yet flushed all the latest changes to the files when you are copying the files; the database file and the transaction log file may not be in a consistent state with respect to each other. This could make it impossible to load your database from the backup copies.
That is an excellent point. I will have to look into that I guess as an update to my script. That also gets me thinking of backing up mysql daily too I guess. Something I overlooked.

This server will have 13 workstations accessing it btw if that matters.

Thank you very much.
Ryzen x1800 * Asus x370 Pro * CentOS 7.4 64bit / Icewarp /

tunk
Posts: 1206
Joined: 2017/02/22 15:08:17

Re: Backing up my server question

Post by tunk » 2017/11/09 20:59:03

On the preventive side you may want to use RAID 6 - you have twice the redundancy.

northpoint
Posts: 107
Joined: 2016/05/23 11:57:12

Re: Backing up my server question

Post by northpoint » 2017/11/09 23:46:22

I guess Ill just rsync N tar > /dev/st0 ?

Thanks for the other hints though.
Ryzen x1800 * Asus x370 Pro * CentOS 7.4 64bit / Icewarp /

hunter86_bg
Posts: 2019
Joined: 2015/02/17 15:14:33
Location: Bulgaria
Contact:

Re: Backing up my server question

Post by hunter86_bg » 2017/11/10 05:03:49

Here is another way.:
1.DB only:
Login to the DB and Lock it until the snapshot is created.Unlock after the snapshot creation is over.
2.Create na lvm snapshot
3.Mount the snapshot
4.Archive the contents of the snapshot.Everything that was not changed is a symbolic link to the original file.
5.Unmount and remove the lvm snapshot.

Post Reply