Differential backups?
Moderator: General Moderators
-
alex.barylski
- DevNet Evangelist
- Posts: 6267
- Joined: Tue Dec 21, 2004 5:00 pm
- Location: Winnipeg
Differential backups?
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?
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?
- Ambush Commander
- DevNet Master
- Posts: 3698
- Joined: Mon Oct 25, 2004 9:29 pm
- Location: New Jersey, US
Re: Differential backups?
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.
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?
Code: Select all
svn add --force *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?
- Ambush Commander
- DevNet Master
- Posts: 3698
- Joined: Mon Oct 25, 2004 9:29 pm
- Location: New Jersey, US
Re: Differential backups?
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?
Sorry I googled quickly to read up on the command and that is the doc I was returned...by bad.
Actually ignore that...I guess that is why you said I would have to commit.
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
I think that is where I will have problems. What about existing files which have just be updated and would typically updated via commit?subdirectories looking for new files.
Actually ignore that...I guess that is why you said I would have to commit.
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
- Ambush Commander
- DevNet Master
- Posts: 3698
- Joined: Mon Oct 25, 2004 9:29 pm
- Location: New Jersey, US
Re: Differential backups?
What is your ideal workflow?
-
alex.barylski
- DevNet Evangelist
- Posts: 6267
- Joined: Tue Dec 21, 2004 5:00 pm
- Location: Winnipeg
Re: Differential backups?
1. Develop code on server all day
2. Make backup at days end
3. Merge latest backup with previous backup
2. Make backup at days end
3. Merge latest backup with previous backup
- Ambush Commander
- DevNet Master
- Posts: 3698
- Joined: Mon Oct 25, 2004 9:29 pm
- Location: New Jersey, US
Re: Differential backups?
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
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?
That would work too... 
- Ambush Commander
- DevNet Master
- Posts: 3698
- Joined: Mon Oct 25, 2004 9:29 pm
- Location: New Jersey, US
Re: Differential backups?
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.
Re: Differential backups?
I love --force.