Differential backups?

Ye' old general discussion board. Basically, for everything that isn't covered elsewhere. Come here to shoot the breeze, shoot your mouth off, or whatever suits your fancy.
This forum is not for asking programming related questions.

Moderator: General Moderators

Post Reply
alex.barylski
DevNet Evangelist
Posts: 6267
Joined: Tue Dec 21, 2004 5:00 pm
Location: Winnipeg

Differential backups?

Post by alex.barylski »

I asked a similar quesiton on an oother forum and only received replies telling me how I was using SVN incorrectly. So this time I'll try and make myself more clear.

I do not wish to use SVN I simply want to make backups at days end and have any changes merged with the previous backup, similar to what SVN offers but the reverse.

Ideally I would be able to extract revisions/changelogs from the backup much like it were a SVN repository.

Is there a way I can force SVN into doing this? svn import doesn't appear to merge with a diff...I believe I would have to check out a working copy and re-commit for changes to be merged.

I don't wish to use SVN for the simple purpose that my file structure changes frequently, enough that using SVN becomes a PITA, having to notify SVN each time I upload a new image or remove an old one or add a folder then maybe remove one, etc, etc, etc...

My code is very modular even at this level, so yes file changes happen frequently.

Ideally I want to keep my code on my Debian server as is and have SVN on my Windows machine which is where I store backups.

So I ask is there a differential backup tool for Windows or is there anyway I can force SVN into behaving this way?
User avatar
Ambush Commander
DevNet Master
Posts: 3698
Joined: Mon Oct 25, 2004 9:29 pm
Location: New Jersey, US

Re: Differential backups?

Post by Ambush Commander »

So, basically, you want SVN, but with an easy way to commit everything (I won't comment on the fact that you really should commit incrementally.)

Basically, you want to run `svn add --force *` and `svn status | grep '\!' | awk '{print $2;}' | xargs svn rm` (courtesy here) and then commit.
alex.barylski
DevNet Evangelist
Posts: 6267
Joined: Tue Dec 21, 2004 5:00 pm
Location: Winnipeg

Re: Differential backups?

Post by alex.barylski »

Code: Select all

svn add --force *
http://svnbook.red-bean.com/en/1.0/re01.html

I couldn't find the --force switch what does it do?

I don't think that will work, as I understand svn add will only add files/folders to the working copy...

What about existing files? Are they updated/merged with the latest copies?
User avatar
Ambush Commander
DevNet Master
Posts: 3698
Joined: Mon Oct 25, 2004 9:29 pm
Location: New Jersey, US

Re: Differential backups?

Post by Ambush Commander »

You should upgrade. Subversion 1.5 is the latest version. The --force flag causes Subversion to recurse into all subdirectories looking for new files.
alex.barylski
DevNet Evangelist
Posts: 6267
Joined: Tue Dec 21, 2004 5:00 pm
Location: Winnipeg

Re: Differential backups?

Post by alex.barylski »

Sorry I googled quickly to read up on the command and that is the doc I was returned...by bad.
subdirectories looking for new files.
I think that is where I will have problems. What about existing files which have just be updated and would typically updated via commit?

Actually ignore that...I guess that is why you said I would have to commit. :P

I still don't see this working what am I missing?

When I backup to my Windows machine...it's just a simple non-versioning source tree. svn add requires a working copy which I do not have...so I guess I would have to:

1. Take out a working copy
2. Upload it to file server
3. Make changes to source code, file structure through out
4. Bring working copy back to Windows desktop for backup
5. Call 'svn add' on my working copy which will bring all newly added files into repo
6. Delete all non-svn files (those which have been removed by me and no longer exist)
7. Commit all changed files into the repository

If this is correct then I understand you...

I deally I wanted a tool that would just let me drag and drop my latest version over top the previous version and and the mergers would happen automagically but this might do for now.

Thanks :)
User avatar
Ambush Commander
DevNet Master
Posts: 3698
Joined: Mon Oct 25, 2004 9:29 pm
Location: New Jersey, US

Re: Differential backups?

Post by Ambush Commander »

What is your ideal workflow?
alex.barylski
DevNet Evangelist
Posts: 6267
Joined: Tue Dec 21, 2004 5:00 pm
Location: Winnipeg

Re: Differential backups?

Post by alex.barylski »

1. Develop code on server all day
2. Make backup at days end
3. Merge latest backup with previous backup
User avatar
Ambush Commander
DevNet Master
Posts: 3698
Joined: Mon Oct 25, 2004 9:29 pm
Location: New Jersey, US

Re: Differential backups?

Post by Ambush Commander »

How does this sound?

1. Develop all day
2. Calculate diff of today to previous backup (which is what you're calling merging)
3. Upload backup
alex.barylski
DevNet Evangelist
Posts: 6267
Joined: Tue Dec 21, 2004 5:00 pm
Location: Winnipeg

Re: Differential backups?

Post by alex.barylski »

That would work too... :P
User avatar
Ambush Commander
DevNet Master
Posts: 3698
Joined: Mon Oct 25, 2004 9:29 pm
Location: New Jersey, US

Re: Differential backups?

Post by Ambush Commander »

Then that's SVN. Perhaps the hardest thing is getting setup; just svn checkout an empty repository on top of your current code, and then you can use the svn commands I mentioned above.
User avatar
panic!
Forum Regular
Posts: 516
Joined: Mon Jul 31, 2006 7:59 am
Location: Brighton, UK

Re: Differential backups?

Post by panic! »

I love --force.
Post Reply