backup
How to get deleted files back with git pull?
You can reset local branch to what’s at remote git reset –hard origin/main
How do I back up a remote SVN repository
Just use the svnsync command. First, create a fresh repository on your home machine. svnadmin create c:\backuprepo Or on Unix: svnadmin create ./backuprepo Next, create a file named pre-revprop-change.bat: echo exit 0 > c:\backuprepo\hooks\pre-revprop-change.bat Or on Unix: echo -ne ‘#!/bin/sh\nexit 0’ > ./backuprepo/hooks/pre-revprop-change chmod ugo+x ./backuprepo/hooks/pre-revprop-change then, initialize the sync: svnsync init file:///c:/backuprepo https://url/of/your/repository Or … Read more
Using Subversion with DropBox
I’ve got Dropbox, SVN and Xcode working fine here, I’ve had no problems what so ever. You don’t even need to be careful about which machine you commit/update from as Dropbox keeps EVERYTHING synchronised.
Export MySQL database using PHP [closed]
Best way to export database using php script. Or add 5th parameter(array) of specific tables: array(“mytable1″,”mytable2″,”mytable3”) for multiple tables <?php //ENTER THE RELEVANT INFO BELOW $mysqlUserName = “Your Username”; $mysqlPassword = “Your Password”; $mysqlHostName = “Your Host”; $DbName = “Your Database Name here”; $backup_name = “mybackup.sql”; $tables = “Your tables”; //or add 5th parameter(array) of … Read more
meteor: how can I backup my mongo database
First you need to spin up meteor. Then if you run meteor mongo you will get an output something like this: MongoDB shell version: 2.2.1 connecting to: 127.0.0.1:3001/meteor Meteor db host is at 127.0.0.1 with a port of 3001. Exit the mongo shell and use mongodump from your terminal. mongodump -h 127.0.0.1 –port 3001 -d … Read more
What is the best way to implement soft deletion?
I would lean towards a deleted_at column that contains the datetime of when the deletion took place. Then you get a little bit of free metadata about the deletion. For your SELECT just get rows WHERE deleted_at IS NULL
How to save Atom editor config and list of packages installed
Use Git to version control your config file (~/.atom/config.cson), and any other config files (dotfiles) you may have. You can then host your Git repository for free on somewhere like GitHub, and retrieve it on other computers simply by running git clone https://github.com/{username}/{repo}. You can then keep it up to date using git push (to … Read more
Backup a GitHub repository
I am not sure it could cover all your requirements, but you could check out git bundle git bundle This command provides support for git fetch and git pull to operate by packaging objects and references in an archive at the originating machine, then importing those into another repository using git fetch and git pull … Read more
How do I backup a database file to the SD card on Android?
This code works for me! try { File sd = Environment.getExternalStorageDirectory(); File data = Environment.getDataDirectory(); if (sd.canWrite()) { String currentDBPath = “//data//{package name}//databases//{database name}”; String backupDBPath = “{database name}”; File currentDB = new File(data, currentDBPath); File backupDB = new File(sd, backupDBPath); if (currentDB.exists()) { FileChannel src = new FileInputStream(currentDB).getChannel(); FileChannel dst = new FileOutputStream(backupDB).getChannel(); dst.transferFrom(src, … Read more