Re backing up server files

linux_unlimited

Verified User
Joined
May 10, 2005
Messages
11
Hi,
can anybody tell me which files i have to backup so that if my harddisk crashes, i am able to restore directadmin back to its original position
 
/etc/passwd
/etc/shadow
/etc/group

/etc/virtual
/usr/local/directadmin
/home

These are probably the main folders and files that need to be backed up. Not to mention various others for things such as logs and programs.
 
Thnx for replying man,
what do you think will be the other files i need to back up so that other services such as email, ftp, ssh accounts and quotas are set automatically when i copy the files to new fresh install of direct admin
 
Personally I think a backup of all /etc is good.

Logs are in /var/log

/var should be small enough that you can backup that in its entirety

ssh accounts are fine as long as you backup /etc folder

quota file may be in / called quota.* but different per system

ftp is backed up along with /etc

Just make sure when backing up to preserve the settings on files using the command:

cp -rfp file.tar /folder

When you use program such as scp the permissions have potential to be changed. I have spent many hours fixing a system for a user that just copied everything over in root permissions.
 
Yes, rsync will keep ownership and permissions, assuming the destination filesystem supports those attributes.

If the destination filesystem doesn't support those attributes, you may want to look at rdiff-backup. It works by creating a file to hold the metadata and keeps diff data for changed files, for as long as you tell it to. So, you can pull a version from 5 days ago if needed, and they weren't purged.
 
Back
Top