Personal data backup: tar o cpio + gzip - Programming On Unix

Users browsing this thread: 4 Guest(s)
p3p1
Members
As title the best way to backup the personal data (all contained in home dir). What is the your favorite method to data backup ? There are other solutions?
srp
Long time nixers
rsync has proved pretty useful to me. Since my homedir is small, I usually just make a .tar.gz out of it and upload it to my VPS.
~Seraphim R.P.
the artistnixer formerly known as vypr formerly known as sticky
bsdkeith
Long time nixers
Depends on the size of your data.
tar plus gzip, else rsync for larger amounts with its incremental backup.
z3bra
Grey Hair Nixers
I wrote about my backup method on my blog: http://blog.z3bra.org/2014/09/backup-someone.html

TL;DR
  • cpio | bzip2
  • Rotate backups
  • wrap it in a script
  • fire it up via cron
  • export it via rsync (I still need to find somewhere to put my backups)

I even get some fancy mails like this afterwards:
Code:
From: backup@localhost
To: z3bra@localhost
Date: Wed, 17 Jun 2015 03:43:31 +0200 (CEST)
Subject: [BACKUP][20150617] - /var/backup/out/production

BACKUP FINISHED
===============
name    : production
start   : Wed Jun 17 02:00:01 CEST 2015
stop    : Wed Jun 17 03:42:47 CEST 2015
outdir  : /var/backup/out is a mountpoint
outfile : /var/backup/out/production (production.5.BAK)
size    : 1.3G

ROTATION STATE
==============
/var/backup/out/production.0.BAK
/var/backup/out/production.1.BAK
/var/backup/out/production.2.BAK
/var/backup/out/production.3.BAK
/var/backup/out/production.4.BAK
/var/backup/out/production.5.BAK

DISK USAGE
==========
Filesystem                Size      Used Available Use% Mounted on
/dev/sdc1               931.0G    626.0G    305.0G  67% /var/backup/out

BACKUP LOGS
===========

bzip2: I/O or other error, bailing out.  Possible reason follows.

bzip2: I/O or other error, bailing out.  Possible reason follows.
bzip2: No space left on device
        Input file = (stdin), output file = (stdout)
bzip2: No space left on device
        Input file = (stdin), output file = (stdout)
[2015-06-15 04:30][ERROR] - archiving failed: /var/www /var/git /etc
[2015-06-15 04:30][ERROR] - archiving failed: /data
[2015-06-15 04:34][MESSAGE] - File created - production.5.BAK
[2015-06-15 09:00][MESSAGE] - File created - data.1.BAK
[2015-06-16 03:15][MESSAGE] - archived: /var/www /var/git /etc
[2015-06-16 03:25][MESSAGE] - File created - production.5.BAK
[2015-06-17 03:31][MESSAGE] - archived: /var/www /var/git /etc
[2015-06-17 03:42][MESSAGE] - File created - production.5.BAK

--
Cheers.
venam
Administrators
For personal backup I use rsync.
I do it every week, backing up almost everything on my computers (It gives a replica, no need to uncompress anything).
It's fast because it only copies the files that differ.
I also use it to update my website from my local directory.
However, if you want to rollback by dates you might prefer the tarball/compress files approach.

We had another thread about backups http://nixers.net/showthread.php?tid=726 but it's kind of outdated.
p3p1
Members
(17-06-2015, 01:57 PM)z3bra Wrote: I wrote about my backup method on my blog: http://blog.z3bra.org/2014/09/backup-someone.html

TL;DR
  • cpio | bzip2
  • Rotate backups
  • wrap it in a script
  • fire it up via cron
  • export it via rsync (I still need to find somewhere to put my backups)

I even get some fancy mails like this afterwards:
Code:
From: backup@localhost
To: z3bra@localhost
Date: Wed, 17 Jun 2015 03:43:31 +0200 (CEST)
Subject: [BACKUP][20150617] - /var/backup/out/production

BACKUP FINISHED
===============
name    : production
start   : Wed Jun 17 02:00:01 CEST 2015
stop    : Wed Jun 17 03:42:47 CEST 2015
outdir  : /var/backup/out is a mountpoint
outfile : /var/backup/out/production (production.5.BAK)
size    : 1.3G

ROTATION STATE
==============
/var/backup/out/production.0.BAK
/var/backup/out/production.1.BAK
/var/backup/out/production.2.BAK
/var/backup/out/production.3.BAK
/var/backup/out/production.4.BAK
/var/backup/out/production.5.BAK

DISK USAGE
==========
Filesystem                Size      Used Available Use% Mounted on
/dev/sdc1               931.0G    626.0G    305.0G  67% /var/backup/out

BACKUP LOGS
===========

bzip2: I/O or other error, bailing out.  Possible reason follows.

bzip2: I/O or other error, bailing out.  Possible reason follows.
bzip2: No space left on device
        Input file = (stdin), output file = (stdout)
bzip2: No space left on device
        Input file = (stdin), output file = (stdout)
[2015-06-15 04:30][ERROR] - archiving failed: /var/www /var/git /etc
[2015-06-15 04:30][ERROR] - archiving failed: /data
[2015-06-15 04:34][MESSAGE] - File created - production.5.BAK
[2015-06-15 09:00][MESSAGE] - File created - data.1.BAK
[2015-06-16 03:15][MESSAGE] - archived: /var/www /var/git /etc
[2015-06-16 03:25][MESSAGE] - File created - production.5.BAK
[2015-06-17 03:31][MESSAGE] - archived: /var/www /var/git /etc
[2015-06-17 03:42][MESSAGE] - File created - production.5.BAK

--
Cheers.
Hi z3bra the discussion is started from your blog post.
But I tried to find an other solution from nixers more educated than me. However I have between 10GB and 20GB in my home dir, I think that I will use the tar o cpio solution for backup with rotation.
Thank you venam for you link, I try find previous thread but I hadn't seen that.
venam
Administrators
(18-06-2015, 08:03 AM)p3p1 Wrote: But I tried to find an other solution from nixers more educated than me. However I have between 10GB and 20GB in my home dir, I think that I will use the tar o cpio solution for backup with rotation.
I do a weekly backup of more than 100GB using rsync and it takes around 15min.
Doing the whole compression/uncompression thing will take forever but if you prefer having rollbacks by date I can understand.