F
F
Finar2011-11-17 17:43:08
Backup
Finar, 2011-11-17 17:43:08

How do I make a full hosting backup with >50% occupied space?

Hello!

Now it happens like this: Home Server logs into the hosting via FTP at night, downloads the entire site, then archives and deletes the files. Cons of the solution:
- there are more and more sites, and as a result, hundreds of thousands of files are downloaded every night;
- all this does not work very stably, sometimes FTP freezes, skips the file;
- some hostings limit the listing of files via FTP if there are too many of them;
- etc.;

How you want to do it:
1. the script runs at night on the hosting
2. archives the entire site into a single archive
3. uploads it via FTP to the Home Server
4. deletes the uploaded archive

The scheme will not work if the volume of files exceeds 50% of the available disk space of the hosting: the archive with the files cannot be created.

Who can offer what?

Thank you!

Answer the question

In order to leave comments, you need to log in

4 answer(s)
@
@sledopit, 2011-11-17
@Finar

rsync to a server with a large disk. and then archive it there.

A
Andrey Yantsen, 2011-11-17
@zvirusz

ssh [email protected] tar -zc /var/www/d1 /var/www/d2 >backup.tar.gz
Will create a TarGz archive with the contents of the /var/www/d1 /var/www/d2 folders without using the server's disk space. The archive will be created on the local computer. Under Windows, emnip, you need to use plink (from the putty package).

K
kreativf, 2011-11-17
@kreativf

I would try the cloud:
www.crashplanpro.com/business/
There is a plan for $7.50 per month with free traffic and unlimited space. There is an option to test for free for 30 days.

B
BasilioCat, 2011-11-18
@BasilioCat

- It is possible to upload backups to FTP (in the absence of rsync) without creating intermediate files
tar czf - $site | ncftpput -u $FTP_USER -p $FTP_PASSWD -c $FTP_HOST $FTP_DIR/$DT/$site/files.tgz
and databases - There is also a rather interesting rdiff-backup section that allows you to store the current full backup with incremental "rollback files" that allow you to restore data to any date. Naturally, it must be deployed on your server/vps. - Well, quite an industrial option: use rsync + snapshots. Rsync is done to the server, on the file system of which snapshots are periodically created. And space is saved, and extra volumes are not pumped over, and several archive copies are always at hand. It is quite good if the file system also supports compression - zfs for example.
mysqldump -u $MYSQL_USER -p$MYSQL_PASSWD $db | gzip | ncftpput -u $FTP_USER -p $FTP_PASSWD -c $FTP_HOST $FTP_DIR/$DT/$site/$db.sql.gz

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question