Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.c > #148010

Re: Somewhat OT: data backup strategies, and did anyone write their own backup tool in C

From Ian Collins <ian-news@hotmail.com>
Newsgroups comp.lang.c
Subject Re: Somewhat OT: data backup strategies, and did anyone write their own backup tool in C
Date 2019-11-15 11:58 +1300
Message-ID <h364fuF4cl5U15@mid.individual.net> (permalink)
References <ONkzF.33509$Mf1.18185@fx11.iad>

Show all headers | View raw


On 15/11/2019 11:45, DFS wrote:
> My backup drive is external, so each night or two I plug it in and run
> some custom python code to sync local to backup.
> 
> The method is a little odd, maybe.  I copy into a SQLite table all the
> directories, filenames and modified dates on the local and backup
> drives, then use outer join queries to see what's out of sync.  Then
> copy from local to backup all new or changed files.  Then delete from
> the backup what's not in local.  When done they're pretty much mirror
> images.
> 
> It works fine, but loading the filenames into SQLite is slow.  I don't
> run it for the entire drive - just the directories I altered since the
> last backup.  Which I have to remember, or go hunting thru.  So it's not
> very efficient.
> 
> Rather than using the database, I probably should just go directory by
> directory, file by file.  I'm thinking of doing it in C (for practice,
> using dirent() or command()).
> 
> How do you guys backup your systems?  rsync?

rsync is as good as anything for quick and reliable backups.  If you 
want history, use a filesystem such as ZFS that supports snapshots and 
replication.

-- 
Ian.

Back to comp.lang.c | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

Somewhat OT: data backup strategies, and did anyone write their own backup tool in C DFS <nospam@dfs.com> - 2019-11-14 17:45 -0500
  Re: Somewhat OT: data backup strategies, and did anyone write their own backup tool in C Ian Collins <ian-news@hotmail.com> - 2019-11-15 11:58 +1300
    Re: Somewhat OT: data backup strategies, and did anyone write their own backup tool in C chad <cdalten@gmail.com> - 2019-11-14 18:01 -0800
    Re: Somewhat OT: data backup strategies, and did anyone write their own backup tool in C Jorgen Grahn <grahn+nntp@snipabacken.se> - 2019-11-15 09:50 +0000
  Re: Somewhat OT: data backup strategies, and did anyone write their own backup tool in C Jorgen Grahn <grahn+nntp@snipabacken.se> - 2019-11-15 09:47 +0000
  Re: Somewhat OT: data backup strategies, and did anyone write their own backup tool in C Paul <nospam@needed.invalid> - 2019-11-15 06:23 -0500

csiph-web