Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
backup advice needed
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo
View previous topic :: View next topic  
Author Message
albright
Advocate
Advocate


Joined: 16 Nov 2003
Posts: 2588
Location: Near Toronto

PostPosted: Sat Jul 15, 2017 11:58 am    Post subject: backup advice needed Reply with quote

Hi all - I see that snapback2 is slated for removal
(incompatible with new perl apparently).

snapback2 worked very well as a rolling backup
up which uses hard links and rsync for a simple
and efficient backup system (daily for a week,
weekly for a month and monthly for a year).

My question is just what is a good/simple replacement
for snapback2?
_________________
.... there is nothing - absolutely nothing - half so much worth
doing as simply messing about with Linux ...
(apologies to Kenneth Graeme)
Back to top
View user's profile Send private message
Jaglover
Watchman
Watchman


Joined: 29 May 2005
Posts: 8291
Location: Saint Amant, Acadiana

PostPosted: Sat Jul 15, 2017 12:59 pm    Post subject: Reply with quote

app-backup/rsnapshot
_________________
My Gentoo installation notes.
Please learn how to denote units correctly!
Back to top
View user's profile Send private message
szatox
Advocate
Advocate


Joined: 27 Aug 2013
Posts: 3136

PostPosted: Sat Jul 15, 2017 1:18 pm    Post subject: Reply with quote

Perhaps rsync itself would be a good enough?
I have a daily cron job running a simplistic script built around this:
Code:

DEST="/mnt/bkp"
NOW="$(date +'%Y%m%d-%H%M')"
LOG="/var/log/backup.log"
REF="--link-dest=${DEST}/${REF// /,}"
( rsync -a "${REF}/"  / "${DEST}/${NOW}/"  --exclude '/usr/src/' --exclude '/usr/portage'  --exclude='/mnt/*' --exclude '/tmp/*' --exclude='/proc/*' --exclude='/sys/*' --exclude='/run/*' --exclude='/home/*/.cache' --exclude='/home/*/.gvfs' 2>&1 ; ) > "${LOG}"  && echo local filesystem backup succeeded || echo local filesystem backup failed. Reffer to "${LOG}" for details
echo reading log file: "${LOG}"
cat  "$LOG"

Unfortunately you can't use find to remove backups "older than" (because -a preserves time), but since directories are named with timestamps, this is a minor issue.
Of course there are a few improvements possible, like backing up each mountpoint separately by running multiple instances of rsync -x, but then you'd have to add some metadata making it more complex, and I'm not that much into making minor improvements to something I'm going to completely redesign (because my needs evolve)

Things not included here are:
Making "incremental" or "full" backup and logic that picks the mode. Unset REF to demand full backup (without hardlinking)
Finding previous backup (needed for setting REF) and deleting old backups. I've done it the "ugly" way, sorting backups by names. Works well enough in my case, but could potentially become unreliable in case of heavier duty scenarios, so I'd rather not shame myself by posting it here.
Back to top
View user's profile Send private message
Tony0945
Watchman
Watchman


Joined: 25 Jul 2006
Posts: 5127
Location: Illinois, USA

PostPosted: Sat Jul 15, 2017 2:47 pm    Post subject: Reply with quote

Still works with stable perl 5.24, the bug reports reference 5.26

I just installed it after moving the package to my local ebuild.
But I understand your concern for the future.

Personally, I would prefer an application that used bash or python, not perl. Perl is a continual problem on Gentoo.
Back to top
View user's profile Send private message
skunk
l33t
l33t


Joined: 28 May 2003
Posts: 646
Location: granada, spain

PostPosted: Sun Jul 16, 2017 12:50 pm    Post subject: Reply with quote

personally i find app-backup/borgbackup awesome...
Back to top
View user's profile Send private message
josephg
l33t
l33t


Joined: 10 Jan 2016
Posts: 783
Location: usually offline

PostPosted: Sun Jul 16, 2017 2:27 pm    Post subject: Reply with quote

i do btrfs:snapshots:send/receive
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum