View Full Version : How-To what to backup on a 1and1 Root Server
eWebtricity
02-06-2005, 03:27 PM
This very much depends on the configuration of your Root-Server. For the standard installation it is a good idea to backup the following directories recursively to be able to restore the system after a reinitialization.
Directory Description
/boot: Files important for boot process
/etc: System configuration files
/home: Domains and home directories of users
/root: Homedirectory of root
/var/lib/mysql: MySQL-Databases
/var/logs: Log-files
/var/spool/mail: User-mailboxes
/var/spool/cron: Cron-Jobs
/usr/lib/python2.1/site-packages: PLESK Configuration
Remember, you may have additional things to backup that are specific to your server or setup.
VerityNS
02-21-2005, 11:55 PM
I hope this doesn't come off sounding too stupid, but can you explain the best practices and or methods on backing up these directories. Should they be backed up daily/weekly/monthly? Would an off site backup be the best method?
Thanks in advance! :)
eWebtricity
02-23-2005, 12:51 AM
There are no stupid questions, nobody knows everything.
Here's the simple overview:
1. Find a backup script that will tar the files, maintain them, and FTP them offsite. I use one from www.worldwidecreations.com but there are many free ones available out there.
2. Setup offsite FTP, either on another one of your servers or 1and1 has 20GB available for $50/month. (1and1 doesn't charge you for the bandwidth on their backup product, but you would be charged for the FTP bandwidth if you did it to another one of your servers)
3. Configure the backup to run at a desired time and/or frequency. I simply place my backup script in the /etc/cron.daily directory. This automatically executes the script every night (late, like 2AM or something so nobody really notices)
The script is a simple text file and has comments that explain how to configure it, basically you specify what directories to backup, where to FTP them, your FTP userid and password, etc ... Let's face it the real danger here is the loss of a hard drive.
Probably the safest way to do this is to execute a cron job that does a psadump using the plesk utility and then a cron job to tar up those psadump files and FTP them offsite somewhere. You might also add the directories above to be double safe. You can never go wrong with backups. Then if you have a need, you can just go grab that day and untar and restore it with the plesk utilities.
Hope that helps, let me know if you need more detail.
dhodge
03-18-2005, 05:35 PM
A good utility to run automated backups is TotalBackup by 4psa.com. I use it and it works great, although I haven't tried a restore yet :lol:
www.4psa.com has a bunch of Plesk tools you can purchase.
Jason Lee
03-18-2005, 06:33 PM
A great place to get a backup account to store server backups is Gnax. The backup accounts come with rsync and ftp access and only cost $5/month per 10GB with a $15 one time setup fee.
sholzy
05-13-2005, 05:00 AM
There are no stupid questions, nobody knows everything.
Here's the simple overview:
1. Find a backup script that will tar the files, maintain them, and FTP them offsite. I use one from www.worldwidecreations.com but there are many free ones available out there.
[snip]
3. Configure the backup to run at a desired time and/or frequency. I simply place my backup script in the /etc/cron.daily directory. This automatically executes the script every night (late, like 2AM or something so nobody really notices)
The script is a simple text file and has comments that explain how to configure it, basically you specify what directories to backup, where to FTP them, your FTP userid and password, etc ... Let's face it the real danger here is the loss of a hard drive.
[snip]
Hope that helps, let me know if you need more detail.
I downloaded the backup script from wwc and was looking at the "$basepath = " string. It appears only one path can be set.
How are you backing up? Did you specify the "/" directory to backup the entire drive or are you just backing up one path like "/home/*"? I suppose one could run from cron several scripts in sequence to backup different paths?
Any comments or suggestions?
tburt11
01-19-2006, 04:14 PM
UPDATE...
Electronicfur is right... This does not work so well. The files get mirrored, but the perms and ownership is not preserved in addition to the symlink problem. Oh well... Back to tar..
---------------
UPDATE II
On further review.. DON'T DO THIS...
It created a lot of files that had to be deleted by hand. You will need to create tar files before ftp. I learned this lesson the hard way!
----------------
My Root Server comes with space on a 1and1 supplied backup server.
Trouble is, it only supports FTP, not rsync, which would be my choice.
You can use a simple lftp command line to transfer files to the backup server. Note, no compression is used, so you will use up space quick, and no versioning, so what you got, is what you last backed up.
Here is a helpful command for lftp. I put it in a script, which cron runs daily.
lftp -c backupdaily
In the file backupdaily.. put..
open -u urlogin:urpasswd backup111.onlinehome-server.com
mirror --reverse --allow-suid --allow-chown --delete /etc /daily/etc
Add more mirror statements to backup additional directories.
I have way more backup space than data, so I have an alternate that keeps a weekly backup too. Just change the destination folder like this...
mirror --reverse --allow-suid --allow-chown --delete /etc /weekly/etc
And have cron run this config, once a week. Run the daily the other 6 days.
electronicfur
01-19-2006, 07:57 PM
Note that the problem with using lftp mirror with --reverse is that it will not backup any symbolic links.
So I think for some directories you would be better of using tar first.
Cheers,
EF
Highland
02-06-2006, 03:02 PM
The reason that their backup server is FTP is that Plesk supports automated backup via FTP.
I don't recommend 4PSA's utility though. Until they get their act together and make it create only one tar.gz per site instead of a tar.gz of files and a mysql dump file (not even gzipped!) it's not worthwhile. Once you have Plesk set up to do backups via FTP you're pretty well set on site backups. Honestly this is one of the few times where 4PSA's product doesn't even come close to Plesk. I'd buy it if it provided a one stop shop for backup settings and better management of the FTP files.
One note about the 1and1 FTP servers: they are apparently inaccessable outside the local network (likely for security reasons). If you make too many FTP files via manual backup or by putting the files on the server you can only delete files by connecting to your server via SSH and FTPing in that way.
have any of you tried Acronis True Image 8.0 ? looking for someone that has used it to tell me if its worth getting
sorry if this sounds retarded but im still in no way familiar with linux very well, could anyone give me a walkthrough of the backup procedure?
Highland
06-09-2006, 10:33 AM
It doesn't sound like you make many config changes
There's two methods to do this. First is the PSA backup. I only know the 7.5.4 backup system (have not migrated to 8.0 yet)
#/usr/local/psa/bin/psadump -F --nostop --nostop-domain --do-not-dump-logs --tar-ignore-failed-read --force -f - | gzip | split -b1000m - /home/psa-full-nostop-gzip.
The second is a total backup. Beware that this file could take a long time and be very large
#tar zcvfp /home/backup.tar.gz /
If your server is recent (ie FC4 image) use /var instead of /home.
Once that is done you need to connect to your FTP backup account. Make sure you're in the directory where your backup file is located before connecting
#lftp backupXXX.onlinehome-server.com -u username,password
Consult your 1and1 admin panel for your server and login info. Once you've connected use
#put filename where filename is your backup file.
jholzy
06-10-2006, 12:18 AM
If anyone wants to find a good backup script that meets their own specific needs then check out this site: http://www.linux-backup.net/App/ If you can't find something useful here then it probably isn't made. Good luck!
It doesn't sound like you make many config changes
There's two methods to do this. First is the PSA backup. I only know the 7.5.4 backup system (have not migrated to 8.0 yet)
The second is a total backup. Beware that this file could take a long time and be very large
If your server is recent (ie FC4 image) use /var instead of /home.
Once that is done you need to connect to your FTP backup account. Make sure you're in the directory where your backup file is located before connecting
Consult your 1and1 admin panel for your server and login info. Once you've connected use
where filename is your backup file.
thanks a lot, say i wanted to automate this weekly at 3am for example, would i just add those commands in a cronjob ?
vBulletin® v3.7.0 Beta 4, Copyright ©2000-2009, Jelsoft Enterprises Ltd.