Prompt
stringlengths
14
160
Instruction
stringlengths
18
2k
Response
stringlengths
8
2k
Microsoft Azure - how to store backup data
I have a trivial and simple task - I want to store some my data (documents, photos etc) on Azure as backup. Which type of service should I select? Store as Blob? But I want to save a structure of data (folders, subfolders etc). Azure Backup? It stores only archive data, I don't want to archive it all in one. DocumentD...
In addition to what knightpfhor wrote above you might also want to take a look at Getting Started with AzCopy - it is a Windows tool that helps you copy content to / from your local storage to Blob Storage. PowerShell and XPlatCLI are other options as well.
How to backup and restore Virtual machine OS?
In VM ware Virtual machine i have installed the Centos in Window 7.Now i want to re install my Window 7 but i do not want to loose my virtual machine Centos. I Google many time for this topic but did not find any helpful information. Any help? Thanks
Your virtual machine is saved under the form of multiple files, which you can easily back-up on an external hard-drive, or in the cloud. If you are using VMWare, then your machine will be split into .vmdk, .vmx, .vmxf, .vmsd and .nvram files, depending on your VM configuration. Just check where you store the VM files,...
Is it possible to move a WordPress site from localhost of one machine to localhost of another machine?
I made a website (70% done) in wordpress using xampp in my home PC,But now I need to move the existing work from my PC to my friend's PC to do the rest 30% work. There are some plugins I found like duplicator , WPBackup etc. but through them it is possible to transfer the site to a server through ftp or some other way...
1 Duplicator would work great for this - I often use it when moving from one local environment to another. You would simply need to run the plugin, save the files to a flashdrive/cloud, then upload those files to your new machine. It's also fairly simple to do manually. Sim...
Backup files from a server to another
is it possible to create backup saving some files (copy and replace) from a server to another, not necessary the same provider ? Thanks !
rsync setup through cron is the canonical way of doing this
Backup Derby DB Groovy Script
I wanted to write a groovy script preferably which when called will backup my database in the online procedure. I have found examples on how to do this in java but was confused with groovy script. Any Help? Thanks
1 NVM. I just created a java program and followed the instructions on http://db.apache.org/derby/docs/10.8/adminguide/cadminhubbkup01.html Share Improve this answer Follow answered Feb 7, 2015 at...
How can I restore forum posts from a Moodle backup into another server installed from scratch?
Last year I taught an online course in my university Moodle website (back then, running Moodle 1.9) . There were a lot of forum posts in that course that I wanted to save for further analysis so I asked my university's technical staff a backup (.zip) of that course. So far, so good. I can import the zip file in my own...
Looks like forum posts are ignored when restoring a course backup from 1.9 to 2.x - https://docs.moodle.org/28/en/Course_backup#Backup_and_restore_from_1.9_to_2 An upgrade will probably work though... Install Moodle 1.9, then restore the course so its in the database. Check the forum posts are there. Then upgrade firs...
Docker: Run commands from multiple containers
I want to execute a command that uses commands from multiple containers. E.g., I want to execute a backup script that used psql and pg_dump commands. docker exec db_backup pg_dump failed to exec: exec: "pg_dump": executable file not found in $PATH docker run has an option --link. Is there a similar option for exec? T...
There is not --link option for docker exec. If you want to backup using a special script: Create a new image db_backup starting from the postgresql one (the one that the db container uses), adding the backup script to some folder. Do docker run --volumes-from db db_backup your_backup_script.sh.
Postgresql Auto backup script runs in terminal but does not runs in CRON job
I used Common Postgresql backup script from Automated_Backup_on_Linux It runs in the terminal vijay@HCL:~/backups$ bash pg_backup.sh But does not run when in CRONTAB in Ubuntu 12.04 */1 * * * * /home/vijay/backups/pg_backup.sh Not even logs error in /var/log/syslog
Looking at the difference between your two commands you are running it in a different way, the first is being run from within the directory, the second is being run from the full path. My suggested next options would be; Run the script with the full path from your command line and see if any errors are generated and ...
Reading a file without causing access denial to other processes
I've been thinking about writing a small specialized backup app, similar to newly introduced file history in Windows 8. The basic idea is to scan some directories every N hours for changed files and copy them to another volume. The problem is, some other apps may request access to these files while they are being back...
My vote's on VSS. The main reason is that it doesn't interfere with other processes modifying your files, thus it provides consistency. A possible inconsistency pretty much defeats the purpose of a backup. The API is stable and I wouldn't worry about its future.
Windows Task Scheduler - specify time window, but only fire once
I want to run a backup twice a day, but I'm unable to make assumptions on when the computer is turned on. As an example: If I create a task in the task scheduler to run a backup script at 9 AM and 9 PM, I have no guarantee that the backup will run, since the computer might be powered on at 10 AM and shutdown at 8 PM. ...
Not really. The easiest way to handle it is to tell the users to never shut it down. Admittedly that's not terribly useful depending on your environment. You can scheduled a job to run on startup or on logon. That would theoretically catch your 9 AM window. The hard one would be the 9PM backup. You may be able ...
How to deny a poweroff without killing a running script that will execute it?
I have a backup script that executes the poweroff command to shutdown my machine once all backups are finished. However it happens that I want to deny the poweroff, but without killing the script process, as it would corrupt my backup and leave a bad mess. How can I make the poweroff not execute without pausing or kil...
1 The script will execute the poweroff command. If you want that to fail, you can temporarily change the /sbin/poweroff file permissions so it is not executable. First, become root to gain full access to protected system files: sudo su Now remove the "is executable" permis...
Amazon S3 Lifecycle rules Prefix to move files to Glacier with certain naming convention
I am using Duplicati to store backup of important documents on Glacier, however the problem is with Lifecycle Rule Prefix. Duplicati guide says use prefix duplicati-b* to move dblock files to Glacier. Basically it asks to move all files beginning with duplicati-b, its been two days but the rule is not working :( Is t...
I just used duplicati-b and the files moved over. :) It seems the prefix works as it is. No wildcard required.
Back up the whole Alfresco installation directory, hosted on Amazon EC2 instance
I have an Alfresco community installation, hosted on Amazon Web Services, which I am using as a personal repository. I am starting having quite important docs stored within (roughly 2Gb), so I am thinking about how to implement a strong backup/restore strategy. I have seen many tutorials and official docs, showing how...
If both your alf_data and postgres directory is on the EBS, than a snapshot is sufficient. You just need to know that a hot-backup (done while running Alfresco) could be inconstant: out of sync database & alf_data or inclomplete within a transaction. A cold-backup is the best, take look at the Alfresco Wiki for more i...
run-time error 1004 on backup macro that worked before and works on other users
I have a backup macro that runs every time when I save my excel file and saves a copy of the workbook into a folder. Now I got a new computer where I use the same file, and it does not work anymore, I get run-time error 1004. My co worker uses the same excel file and the same computer with another user and for him t...
The file cannot be saved because you are attempting to save the file name with your date formatted as "yyyy/mm/dd"? My computer will not allow me to save a file name with backslashes in it. Try changing the Format function to Format(Date, "yyyy-mm-dd").
Best way of backing up mysql clustered database
I have a mysql cluster database spread on 2 servers. I want to create a backup system for this database based on the following requirements: 1. Recovery/restore should be very easy and quick. Even better if i can switch connection string at any time i like. the back up must be like snapshots, so I want to keep copies...
The best way to back up a MySQL Cluster is to use the native backup mechanism that gets initiated with the START BACKUP command in the `ndb_mgm. Backup is easy (just a single command) and relatively quick. Restore is a bit more tricky, but is at least faster and more reliable than using mysqldump. See also: http://dev...
How to TEST Backup in ANDROID (perhaps using bmgr)
So I have implemented all the backup method following official android backup tutorial :http://developer.android.com/guide/topics/data/backup.html But After I am done with everything, I cannot test it! The Android website says to use bmgr and use commands such as "adb shell bmgr run" etc, but I have no idea what this ...
1 The solution to this problem. You need to find adb.exe file in the Android ADK folder. It is inside platform-tools folder. And then you have to use terminal to go to the folder that has adb so that when you do ls, adb appears. Then you do the command but with ./ in the ...
Backup app from Xcode
Im having a problem with my app when the user restore it into another iPhone, i made a fix and i need to test, so short question: It is possible to backup an app installed from Xcode in iTunes and restore in another iPhone? Thanks!
After more research and test i can say its not possible...
Why Hadoop secondary Namenode take backup for every one hour?
Everyone has known that Name Node can store metadata and every fraction of a second what happen everything stored in Log files. To identify the bugs log files only key factors. Now come to the point by default secondary Namenode can take a backup of metadata from Namenode periodically. Name space image, edit log file...
1 Secondary Namenode(SNN) was the first of numerous attempts to reduce NN load and to a certain extent provide H.A. Since then there have been upgrades to SNN like Check Point Node, BackUp Node. SNN: copies and merges the FSImage and edits.log periodically for faster NN st...
Automate Export Server Package daily
I have a IIS 7 server which hosts 19 applications internally. As part of daily backup process is there any way to automate the Export Server Package feature that can run on a daily basis at a specified time and dump the package zip file on a network drive. Let me know if this is possible. Thanks in advance.
You can do that by telling the windows task scheduler to run the msdeploy command line recurrently. Create a batch file with the following content: set currentDate=%DATE:~10,4%-%DATE:~4,2%-%DATE:~7,2% "c:\Program Files (x86)\IIS\Microsoft Web Deploy V3\msdeploy.exe" ^ -verb:sync ^ -source:webServer ^ -dest:arc...
cassandra backup like mysql
I am learning Cassandra now-a-days, i have successfully backup and restore tables or keyspace mentioned in this URL. But i am looking for following options 1)Take complete backup of a keyspace at different location other then mentioned directory in cassandra.yaml. -t option create directory in snapshot folder not di...
1 You have a few options...for small amounts of data, you can use COPY to backup / restore from csv: http://www.datastax.com/documentation/cql/3.0/cql/cql_reference/copy_r.html For larger stuff, you've got the right link. You essentially take a snapshot (which puts it in th...
Backing up databases and images from my VPS to Azure
I have my own VPS running Windows Server 2012 and MSSQL 2012 Express. 2 requirements I have: I want to backup all databases to Azure I want to backup images that were uploaded to the websites that are running on this VPS. Now instead of just copying ALL images (~ 15GB and growing) every day, I want to only backup ne...
I'd recommend you take a look at the SQL Server backup to Microsoft Azure tool: http://www.microsoft.com/en-au/download/details.aspx?id=40740. You should look at using Azure Backp for this scenario: http://azure.microsoft.com/en-us/services/backup/. Effectively install a backup agent locally and it will manage backu...
Backup of SQL Server 2008R2 database is huge
I am backing up a SQL Server 2008 R2 database with the intention of restoring it elsewhere. When I back it up using the backup wizard (right click tasks, backup ) the size of the resulting backup is much larger than I know the database should be (c45Gb when there is only about 5Gb of data) How can I get a reasonably s...
I created a smaller backup by going to the options tab on the backup and set the compression to 'compress backup', I also chose Overwrite all existing backup sets and Backed up to a new media set name.
MySQL mysqldump.exe is only backing up schemes
I have this command which is only creating statements to re-create the database and schemes, but it's not backing up any of the data: "C:\Program Files (x86)\MySQL\MySQL Workbench CE 6.0.6\mysqldump.exe" --user=myuser --password=mypassword --host=localhost --port=3306 --result-file="Z:\mysql-backup\backup.%date:~10,4...
With the basic command: mysqldump -u myuser -pmypassword --databases wpzb watt > dump_file.sql You should get all the data and schema in one file It might be best to execute the command for each database separately: mysqldump -u myuser -pmypassword --default-character-set=utf8 --single-transaction=TRUE wpzb > wpzb_d...
Db2 DB21019E backup script error
I am trying to run a backup script to backup database Sample su -c "${DB2Home}/db2 quiesce database immediate force connections" ${InstanceName} echo "[INFO:`date`]Executing the backup command: ${DB2Home}/db2 backup database ${Primary_Server_DBName} to ${BackupFolder} compress without prompting " su -c "${D...
The solution is to add . /home/db2inst1/sqllib/db2profile before the db2 operations
Backup Folder and Ambiguity of Definition of Variables
Ok, so I am converting code to C#, and I am using Visual Studios 2013. I have a backup folder with a copy of various files from the project in it because I cannot build the project unless they are in there. If the files are not in there, an error saying, "source file 'FolderPath\Backup\FileName' could not be found. So...
I'm not sure if I understand the problem right. (Why this backup folder is needed at all.) I think 'backup folder' means a folder in the solution explorer. So it may be that you have to switch the 'Build action' of the files in the backup folder to 'None'. (Right click on the files->Properties then see Property Window...
Is there a utility for creating hard link backup?
I need to create a clone of a directory tree so I can clean up duplicate files. I don't need copies of the files, I just need the files, so I want to create a matching tree with hard links. I threw this together in a couple of minutes when I realized my backup was going to take hours It just echos the commands which I...
1 Generally using find like that is a bad idea - you are basically relying on separating filenames on whitespace, when in fact all forms of whitespace are valid as filenames on most UNIX systems. Find itself has the ability to run single commands on each file found, which i...
Percona XtraBackup "create" vs "prepare" backup
I'm trying to understand XtraBackup and I can't really get the difference between creating a backup and preparing it. Preparing for what? I've created a backup, what for is the preparation? Does it anyway need to be prepared? E.g. here
http://www.percona.com/doc/percona-xtrabackup/2.1/innobackupex/innobackupex_option_reference.html to option --apply-log -apply-log Prepare a backup in BACKUP-DIR by applying the transaction log file named xtrabackup_logfile located in the same directory. Also, create new transaction logs. The InnoDB configuration i...
Powershell Find Replace & Backup
Right now, i am looking to improve my code to use less space and be more intelligent, i need the below code to only backup files IF it's modified by the Find & Replace, right now i'm doing a backup of everything and overwriting old back-ups. The next thing i would like would be to NOT overwrite the backups, but instea...
Well, to start a large portion of your regex replaces probably aren't working, you need to escape most of them...for example "\". Anyways you can shorten up the whole replace to one expression like this: -replace '[*"#¤&()=?´`|@£${\[\]}^~¨*<>\\_;.!]','Æ' #query to show it working '*"#¤&()=?´`|@£${[]}^~¨*<>\_;.!' -repl...
How to create a backup for database
I try to create a backup script, with PHP and MySQL, but I have some problems. This is what I have done so far: $sql="SHOW DATABASES"; $query=mysql_query($sql,$connect); $num_rows=mysql_num_rows($query); echo "Baze de date:".$num_rows; while ($row = mysql_fetch_assoc($query)) { $sql2="SHOW TABLES FROM "....
All you want to take backup of your database. Below commands should do a work for you. On Linux /usr/bin/mysqldump -u{USERNAME} -p -h{HOST_NAME} {DATABSE_NAME} > {FILE_NAME}.sql On windows C:\Program Files\MySQL\MySQL Server 5.6\bin\mysqldump -u{USERNAME} -p -h{HOST_NAME} {DATABSE_NAME} > {FILE_NAME}.sql Try below c...
How can I create new empty folders in a directory using names of subfolders of another directory using batch script?
My main goal is to backup SVN repositories in REPOS folder. Since "svnadmin hotcopy" has to have both source and target folders I need to create new folders in different directory with name of folderName_backup and then copy them using "svnadmin hotcopy". Btw this has to be done in windows batch file. My code for this...
for /f "tokens=*" %%G in ('dir /b /a:d "%Source%"') do ( md %destination%\%%G svnadmin hotcopy %Source%\%%G %Destination%\%%G ) The problem with the old solution was instead of getting folder names in directory it gets subdirectory of the directory. This is why the result was something like C:\where\the\ba...
MS Access Database Backup
I have uploaded the MS-Access database at a shared drive location in a Windows folder. For couple of days, the database works fine and then it automatically starts creating backup copies of the database every time users try to use the database. While the backup copies are created the size of parent database gets reduc...
1 Online searches show this could be related to: 1. 64bit of Access vs 32bit version 2. The version of access you are running, if it is not patched See related question: Simular Stackoverflow Question Share Improve this answer Follow ...
Bash script to delete files from remote FTP older than 7 days
i got a bash script from internet, its look good. its already backup, upload FTP, delete old backups older than 7 days. but its not delete old backup older than 7 days in remote FTP #!/bin/sh Mdate="$(date +"%d-%m-%Y")" mysqldump -uroot -pPassword asia stats | gzip > /home/backup/asia_$Mdate.$ cd /home/backup/ ftpse...
Generally the easiest way to keep files for just 7 days is just to name them .mon, .tue, etc. Then you just overwrite the previous week's file every Monday, Tuesday, etc.
Backing up and restoring table date in Oracle 10g
We have a table equipment_details which would require a refresh every month as part of a release. These are reference tables, maintainng the details of the equipments. There are other tables which maintains the order details, having foreign key reference to this table. The requirement is to update new data in to equi...
You can use flashback technology to unload changes from specific table to specific point or time. http://docs.oracle.com/cd/B19306_01/backup.102/b14192/flashptr003.htm
How to back up code online using SVN [closed]
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers. This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by prog...
Apache Subversion is a version-control system, i.e. a time machine for your code, not a backup tool. While SVN can act as a backup system, it provides much more than just backups and opposed to Git -- Subversion is a real time machine where you can revert to a particular point in time and see your code as it was in 20...
Linux image backup utility
Can anyone suggest a linux backup utility that can take a copy of the state with the current configuration so I can boot with it or install it on an external/new partition on a different machine?
1 I used Deja Dup which is installed in Ubuntu by default. It's actually a front-end of Duplicity which you can use if you prefer command line approach. Of course, there are several other solutions so take a look on a list here Share Improve this answer ...
How to chmod folder data/data/com.example.anotherapp
I make an application to backup & restore app and data with roottools. I backup folder data/data/com.example.anotherapp to sdcard. Now, I uninstall/reinstall and copy folder com.example.anotherapp to data/data/ but app can't run. How to chmod folder com.example.anotherapp? public static boolean restoreDatabase(Con...
1 You can do it like this: String path = "/yourFolder"; String[] chmod = { "su", "-c","chmod 777 "+path }; try { Runtime.getRuntime().exec(chmod); } catch (IOException e) { e.printStackTrace(); } Share Improve this answer Foll...
Codeigniter Database backup not returning readable file
This my controller function in which i used database util library to crate backup for database. When i download a backup the zip file cannot be opened with zip extractor. What should I do? function backup_database() { $file_name = 'accounts'; $date = date('@Y.m.d-H.ia'); $name = $file_name . ...
This is a function I use, to perform a database backup. function _backup_db() { $this->load->dbutil(); $this->load->helper(array('file', 'download')); $backup =& $this->dbutil->backup(); $filename = 'backup-' . time() . ' .zip'; write_file('/backups/' . $filename, $backup); force_download($...
Add timestamp to filename with msqldump from batch file
I'm trying to add a timestamp to a mysql database dump file with a .bat file but it's not going too well. The timestamp isn't added - i just get a backup-.sql file. Any tips? My file: @echo off cls echo Date format = %date% echo dd = %date:~0,2% echo mm = %date:~3,2% echo yyyy = %date:~6,4% echo. echo Time format = %t...
quick edit should fix it: @echo off cls echo Date format = %date% echo dd = %date:~0,2% echo mm = %date:~3,2% echo yyyy = %date:~6,4% echo. echo Time format = %time% echo hh = %time:~0,2% echo mm = %time:~3,2% echo ss = %time:~6,2% echo. set timestamp=%date:~6,4%-%date:~3,2%-%date:~0,2%-%time:~0,2%-%time:~3,2%-%time:~...
What is this "was.drupal" directory?
I'm working on a Drupal installation followed till now by a person I cannot contact anymore. Inside my Drupal directory there's a "was.drupal" directory. Does someone know what it could be? I'm pretty sure it is generated by some kinf od drupal tool, but I don't know what.
I dont think that anything like was.drupal exist in the directory structure of drupal. You can refer: Directory Structure Drupal 7 Folder Structure & important files Drupal: How to structure your modules directory
Heroku file backup without s3
I have a Redmine (www.redmine.org) installation pushed up onto Heroku (cedar stack). On my local instance of Redmine, the way file uploads work is that the database simply stores some data about the file including a name and the location of the file on disk, and the file itself is just stored on disk under [app-locat...
I know this question is a bit old, and you may have already found a solution, but just in case other people stumble on this question: Heroku really is storing the files where it says it is. What's happening when you run heroku run bash is Heroku is spinning up a one-off dyno to run the command. This means that you wi...
Use Hobocopy to backup .PST's on system (Using exact path)
Morning All, We're currently running some software for our users which is failing to copy their PST's on to our servers, it's too intrusive, requires client side software and configuration and its paid for! I'm used to free/open source software and love command line batch files compared, as I find them easier to autom...
1 I'm the author of hobocopy. It is written to expect source folder, destination folder, and a file selector. So you're not going to be able to use a full path. That said, you can use the flags that can be found by running "help for" at the command prompt to break apart the...
Make the oracle backup files in other space via ftp
I'm using Oracle 11g XE and I want to make the backup files in an other space that I can connect to it just via ftp. Is it possible to run a script like : ALTER SYSTEM SET DB_RECOVERY_FILE_DEST = 'ftp: // user:password @ ftpserver_url'; or Is there any other way to do it ? If not, How can I transfer the backup files...
No, not using ftp. You could backup on a hard mounted nfs volume.
Does Microsoft Azure have a REST API to view information about Backup Vaults?
I'd like to consume information about the Recovery Services that I have setup in Azure. If I go to that section inside the Microsoft Azure Management Portal, I'll see a list of the Backup Vaults that I have created. I'm looking for an API that will let me pull up data about it, such as the one that is presented on the...
I asked the same thing on the MSDN forums. Apparently, as of this date, there is no API that can be used to pull in that information. Source: reply from MSDN forums
Copying backup files from a network drive daily, need different dated copies for the end of each day
I am trying to backup files from a network drive to my C: drive. for the copy I am using: xcopy "\MY_SERVER_IP\SharedDRIVE\TEST*" "C:\Test_Folder" /D /E /C /I /H /Y Is there any way I can have the date added onto this and the information not replace but instead compound and have a daily record of changes made to the ...
This is a way of getting a DateTime string independent of localization: for /f "tokens=1 delims=." %%i in ('wmic os get localdatetime^|find "."') do set dt=%%i This is format YYYYMMDDHHMMSScc You can shorten this string to your needs. for example: set dt=%dt:~0,8% will set it to YYYYMMDD only. set dt=%dt:~0,12% wil...
Remote backup imap
I must archive to email with 1 server to 2 server temporarily and upload to 3 server. Why? My client is changing the server. Resigns from 1 server and want to buy a server 3. Server 2 is my. How can I make remote copies of IMAP? old server -> my server -> new server...
1 imapsync perhaps, although that copies one user's mail, not the entire server. Share Improve this answer Follow answered Apr 21, 2014 at 12:32 arntarnt 9,34255 gold badges2424 silver bad...
Backup directory using cmd with windows scheduler
How can I make a batch file to backup a directory on windows scheduler to automatically update on a specified time everyday e.g 6 pm and save the directory with the directory name along with the date and time the backup was made. I have searched a particular command for backup using cmd. backup d:\Assignment\*.* d:\b...
1 This should work in Vista and higher - it uses Robocopy (don't call it robocopy.bat). Be very careful when specifying the target directory because the /mir option will create a mirror copy and delete files that don't exist in the source tree. The /mir switch will wipe a d...
psql: FATAL: Peer authentication failed for user "expman"
I'm trying to restore a database from backup but I can't connect to postgresql. namespace :db do task import: :environment do import_path = "~/backups" sql_file = "PostgreSQL.sql" database_config = Rails.configuration.database_configuration[Rails.env] system "psql --username=#{database_config['username']} ...
after change pg_hba.conf, you shold reload or send a SIGHUP signal to postmaster pid. so that change applyed. why not use psql -f to execute the backup sql file? or you can use pg_dump backup and pg_restore restore. or copy command backup and restore. LIKE : digoal=# copy tbl_join_1 to '/home/pg93/tbl_join_1.dmp'; C...
Robocopy batch file to move and zip folder and output log
This is what I currently have: ROBOCOPY C:\A\move\Logs C:\A\move\moved /MOVE /S /MINAGE:5 /log+:output.log for /d %%X in (*) do ( "c:\Program Files\7-Zip\7z.exe" a "LOG"%DATE:~7,2%.%DATE:~4,2%.%DATE:~-4%Backup.zip" "%%X\" pause I am having a some trouble trying to setup the batch to zip the Destination folder into a...
1 I would start with this: @ECHO off SET "7ZIP=c:\Program Files\7-Zip\7za.exe" SET "FROM=C:\A\move\Logs" SET "TO=C:\A\move\moved" SET OUTPUT=output.log SET DD=%DATE:~7,2%.%DATE:~4,2%.%DATE:~-4% if not exist %7ZIP% ECHO No 7z && GOTO :END ROBOCOPY %FROM% %TO% /MOVE /S /MIN...
Disaster recovery for TFS 2012
I am using Team foundation server 2012. The TFS is installed in a windows 8 PC. For TFS database I am using SQL server 2008 R2. As a disaster recovery plan I take full backup of tfs_configuration (I think this is the only database used by TFS other than each database for collection) and backup of all the collection da...
1 The ALM Rangers publish a TFS Planning Guide which has a section on how to approach DR with TFS: http://vsarplanningguide.codeplex.com/ For DR it expects you to restore to a machine with the same name. If you want to move TFS to a different machine, the recommended appro...
How to copying FTP files to an specific folders.?
I have .txt file named files.txt which contains a list of file names. files.txt index.php.bk-2013-12-02 index.php.bk-2013-12-07 index.php.bk-2013-12-10 index.php.bk-2013-12-20 index.php.bk-2013-12-26 function.php.bk-2013-12-20 function.php.bk-2013-12-23 contact.php.bk-2013-12-23 contact.php.bk-2013-12-30 I want to c...
Read the file line by line and then just copy the file to your 'backup' folder: $files = "files.txt"; $lines = file($files); foreach($lines as $file) { $file = trim($file); copy($dir . '/' . $file, $dir . '/backup/' . $file); } But that has nothing to do with FTP, right? Also, if your files alway habe .bak- i...
Delete files with filename pattern using bash script
I have this bash script that creates a backup of a database every 5 minutes that i run with crontab. At the end of the day, i want to delete the ones created and leave the last one created on that day. Here's the contents of the script: #! /bin/bash DATE=$(date +"%Y%m%d%H%M") mysqldump -ubackup_user db_to_backup > ~/...
1 After midnight, run the following: old=$(date +"%Y%m%d" -d yesterday) mv "db_${old}2355.tar.gz" different/directory && rm "db_${old}*.tar.gz" I connected the move and delete commands with && as a safety precaution. This way yesterday's backups are deleted only if the mo...
Copying restoring databases in SQL Server 2008/2012
I've got two SQL Servers, one of these servers (Server A) is backing up transaction logs on some database and uploading them to the other (Server B). Unfortunately I have no access to Server A, I simply have to trust that it is doing its job of periodically uploading its transaction logs to Server B. Now, suppose Serv...
1 Unfortunately you can't use snapshot to bring a log-shipping backup instance online. You might be able to do it if the data resides on a san where you can force a fast lun copy and then mount a second copy of it real quick. Even without a SAN you can basically, between l...
find and gzip a directory recursively without a directory/file test
I'm working on improving our bash backup script, and would like to move away from rsync and towards using gzip and a "find since last run timestamp" system. I would like to have a mirror of the original tree, except have each destination file gzipped. However, if I pass a destination path to gzip that does not exist, ...
With proposed changes from my comments incorporated, I suggest this code: #!/bin/bash src="/mnt/$sourceboxname/$drive" dst="/backup/$sourceboxname/$drive" timestamp="$src/timestamp" errors=$({ cd "$src" && find -newer "$timestamp" | while read objresults; do mkdir -p $(basename "$dst/$objresults") ...
Backing up my Amazon AMI to an external image
I'm trying to create an automatic backup of my Amazon AMIs to another region (automatically, of course). This is possible with the web GUI which Amazon provides, but I couldn't find an API with allows you to do that (I searched both the boto and the rest API). The only thing that was close or related to this was the b...
You have to initiate copy ami operation from the destination region. In your copy command/api , you have to specify the source region where your current ami exist. Read this carefully. I am quoting the relevant info from the link I referred belo.... This command is submitted to and initiated from the destination regi...
SQLite database backup android
I have done the following to get SQLite database Backup/Restore working. (1)get registration from Google. [http://developer.android.com/google/backup/signup.html][1] (2)Add the key to Manifest xml file <application> <meta-data android:name="com.google.android.backup.api_key" android:value="backu...
It could be that you simply have not waited long enough. From the docs in reference to the call to dataChanged: This call notifies the backup manager that there is data ready to be backed up to the cloud. At some point in the future, the backup manager then calls your backup agent's onBackup() method. The backu...
run innobackupex with gzip and pipe display output to file
How is it possible to run this and output the innobackupex output to a file (but still send output to the display)? innobackupex --user=root --password=pass --databases="db" --stream=tar ./ | gzip -c -1 > /var/backup/backup.tar.gz I need to ouput the innobackupex log with ... completed OK! in the last line to a file?...
1 I've also noticed that it is a bit challenging to save the "OK" output from xtrabackup to the log file, as the Perl script playing with tty. Here is what worked for me. If you need execute innobackupex from the command line, you can do: nohup innobackupex --user=root --pa...
Batch File that will Backup My Files?
How would I go about making a batch file that empties a backup folder on my PC and then copies over the data on my USB to the folder. And then each evening my files would be backed up by simple clicking on the file. I don't have a very big grasp on how batch files work. Could somebody point me in the right direction a...
1 ROBOCOPY f:\myusb c:\myfolder /mir It will copy from source (the usb) to target (the hd) from/to indicated folders all the new and updated files, ignore and leave all the non changed files and remove from target all the files not present in source. Share Impro...
Time Machine Back Up
I am really sorry for this type of question, but can you please explain to me in a better way the statement below so I can understand better the type of back up that TIME MACHINE does. Thank you "Time Machine keeps hourly backups for the past 24 hours, daily backups for the past month, and weekly backups until your ba...
1 This question isn't really a good fit for SO (which is for development and programming questions); however, Apple has a good videoon the basics of Time Machine. It really is as simple as you've described it: Time Machine will take a backup each hour and keep that backup f...
Bus Error: 10 in C
My code compiles just fine but when I run it I get bus error: 10 void backupf(char *namelist, char *dirname) { char *in_filename; char *out_filename; char line[MAXPATHLEN]; FILE *filenames = fopen(namelist, "r"); if(filenames == NULL) { fprintf(stderr, "Cannot Open File\n"); exit(E...
You don't allocate space for the file names; you should. You're writing over indeterminate memory. This would probably work better: void backupf(char *namelist, char *dirname) { char in_filename[MAXPATHLEN]; char out_filename[MAXPATHLEN]; char line[MAXPATHLEN]; FILE *filenames = fopen(namelist,...
command dump is not found in crontab
I am using CentOS and trying to perform a backup of my /home directory using crontab. When I run my dump command in the terminal it works fine but when I try to run it using crontab it does not run. This is my command: (runs once a week, Friday at 8pm) 0 20 * * 5 dump -0f /Mt/home.bck /home Why doesn't it run? When I...
Most likely because dump can't be found in the environment in which cron is running,
Restore Database - Simple Recovery Model
I am working on below exercise. I would have thought the answer is "Restore the latest full backup. Then, restore the latest differential backup". However, the answer given is "Restore the latest full backup, and restore the latest differential backup. Then, restore each log backup taken before the time of failure fro...
Both answers are incorrect: your and theirs. You are right about one thing -- SQL Server won't let you even CREATE log backups, on a database set to "simple" recovery model. So their answer is incorrect, because it says "restore each log backup", when log backups cannot exist. However, your answer is incorrect, a...
How to close Outlook with VBScript when run from Task Scheduler
I have searched the Stack Overflow site for questions related to closing Outlook. There were a number of hits but none seem to describe what I'm trying to do. The problem I'm trying to solve is how to backup the Outlook data base automatically and unattended. Outlook needs to be closed (if it is running) before cop...
1 I think it is because impersonationLevel has not been set. Try this: Set objWMIService = GetObject("winmgmts:" _ & "{impersonationLevel=impersonate}!\\" & strSysName & "\root\cimv2") Set colProcessList = objWMIService.ExecQuery _ ("Select * from Wi...
How to restore a SQL Backup .bak file on a different (new) server? SQL 2012
I remember myself restoring a db on linux side. I used mysql dump and before I could restore this backup on the other server I had to create a DB with the same name. Now I am going to switch the server on windows side using SQL 2012. I am backupping many SQL DB's and call them for now db1.bak , db2.bak... When I now...
A SQL Server database backup contains the structure and the data, so if you have run a full backup on one SQL Server 2012 server, you can restore this onto another SQL Server 2012 + server instance without having to create an empty database first.
Duplicating PostgreSQL database on one server to MySQL database on another server
I have a PostgreSQL database with 4-5 tables (some of those have more than 20 million rows). i have to replicate this entire database onto another machine. However, there I have MySQL (and for some reason cannot install PostgreSQL) on that machine. The database is static and is not updated or refreshed. No need to syn...
Depends on what you consider "simple". Since it's only a small number of tables, the way I'd do it is like this: dump individual tables with pg_dump -t table_name --column-inserts edit the individual files, change the schema definitions to be compatible with mysql (e.g. using auto_increment instead of serial, etc. : ...
What is the easiest way to move all data to a new MS SQL Server?
I'm moving from 1 Server 2012 box to another Server 2012 box. I'm trying to move my SQL Server 2012 Express instance exactly (databases, logins, ect...) as it is, from 1 server to the other. What is the easiest way to do this? I have just now realized my .bak backups do not restore the way I thought. Here is my code t...
1 The easiest db migration is detach/move file/attach but you must have copied the logins first. You want to have the same uid to have them rebinded automatically. For that, you can use sp_help_revlogin (http://support.microsoft.com/kb/918992). This script will generated a...
Script to zip complete file structure depending on file age
Alright so i have a web server running CentOS at work that is hosting a few websites internally only. It's our developpement server and thus has lots [read tons] of old junk websites and whatnot. I was trying to elaborate a command that would find files that haven't been modified for over 6 months, group them all in ...
Be careful with ctime. ctime is related to changes made to inodes (changing permissions, owner, etc) atime when a file was last accessed (check if your file system is using noatime or relatime options, in that case the atime option may not work in the expected way) mtime when data in a file was last modified. Depend...
Debian Shell Bash Script - Delete old backups/directorys [closed]
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers. Questions asking for code must demonstrate a minimal understanding of the problem being solved. Include attempted solutions, why they di...
Do not reinvent the wheel. Take a look at rsnapshot. Unless you want to use this as a learning exercise, I see no reason why you would want to spend the time that has already been spent to solve this problem.
Zipping and deleting files with certain age
i'm trying to elaborate a command that will find files that haven't been modified in over 6 months and zip them with one command. Afterwards i want to delete all those files and i just archived. My current command to find the directories with the files is find /var/www -type d -mtime -400 ! -mtime -180 | xargs ls -l ...
Break this into several distinct steps that you can implement and thoroughly test separately: Build a list of files to be archived and then deleted, saved to a temp file Use the list from step 1 to add the files to .tar.gz archives. Give the archive file a name following a specific pattern that won't appear in the fi...
Postgres wal archivation delay
I've noticed a lag of archive_command execution. The command is configured to set a flag on arhived segment: archive_command = 'rm pg_xlog/*.backuped ; touch %p.backuped' If I run ls then I see that a lot of segments are not archived: 000000010000098800000029 00000001000009880000002A 00000001000009880000002B 00000001...
The newer segments are probably old segments that have been "recycled" in preparation for future use, but not yet used (and so not needed for recovery)
Rsync syntax to copy specific subfolders
Alright so my web server has the following file structure / /home /home/username /home/username/public_html /home/username/mail /home/username/etc ... /home/username2 ...
You can do it using three filters: rsync -av --filter="+ /home" \ --filter="+ /home/*" \ --filter="+ /home/*/public_html" \ --filter="+ /home/*/public_html/**" \ --filter="- *" / [email protected]:mirror It is important to add a "+" filter for all the directories in the tree b...
Can we use SMO to take backup of database located at hosting server?
I followed the examples from http://msdn.microsoft.com/en-us/magazine/cc163409.aspx I am creating a utility that creates backup of databases (local or remote). I was able to create backup of databases located at my local server. But when I do so for databases located at host server I get following error: System.Data.S...
1 Backup paths are always relative to the server. You can backup to UNC (which I do personally, even if it's a local UNC) or, if you're on a sufficiently recent build of SQL 2012, Azure blob storage (http://technet.microsoft.com/en-us/library/jj919148.aspx). Share ...
How can an Android app folder be backed up and restored on an emulator
Is there a way to back up an Android app folder from an emulator to a computer, then restore it to another emulator? For example, Android emulator A has an app called Foo, therefore it has the following folder with many sub-folders and numerous files: /data/data/com.my.foo I would like to back up this folder, then res...
In eclipse: DDMS perspective -> select emulator in devices tab -> File Explorer on the right hand side Download to PC and revert the process on the other emulator. Pushing via adb: It seems that the eclipse tools does not support putting folders on to device. pushing from adb commandline: adb root push com.my.foo /d...
Postgres HA - Warm standby server lagging
We have recently implemented high availability for our postgres (9.0.4) DB server, through the methods described as Log-Shipping Standby Servers in the Postgres documentation. Everything seems to be fine and working, the WAL files are shipping and are being ingested by the standby server, but we are experience lagging...
1 Most likely your WAL takes a long time to fill up. You can adjust the timeout to force it to switch before it's full. This will increase network traffic significantly, but will give you a max time before the log is sent over. You can check the documentation here. ...
Attempting database export yields webpage not found error
First time I get this problem after backing up over five years. After setting up custom export and hitting 'go' the message is: the webpage not found I proceed to 'more' and get this message: No webpage was found for the web address: http://name.com/cpsess3961873665/3rdparty/phpMyAdmin/export.php Error code: ERR_FI...
1 An export problem with large tables has been fixed in phpMyAdmin 4.0.6. Share Improve this answer Follow answered Sep 13, 2013 at 15:34 Marc DelisleMarc Delisle 8,91433 gold badges2929...
Why RootTools cp command don't work?
I'm trying to make a copy of a file in the etc folder, for that I use the next code in a button: changeNTP.setOnClickListener(new View.OnClickListener() { public void onClick(View v) { File exists = new File("/etc/gps.conf"); if (exists.exists()) { ...
Ok, the next is best solution: int date = (int) System.currentTimeMillis(); String source = "/system/etc/gps.conf"; String destination = "/system/etc/gps" + date + ".conf"; if(RootTools.remount("/system/etc/", "rw")){ RootTools.copyFile(source, destination, true, true); } The problem is that previously I pointed ...
SQL Server Management Studio - trouble restoring from bak and trn
I am trying to restore a database from .bak and trn files. I am not able to see .bak and .trn files through the SQL Server Management Studio. But when I go to the folder I see them. I used T-sql but it says access is denied. I am a sysadmin on the server. Can someone please help me with it. Script: RESTORE DATABASE [...
Make sure your account (windows or sql server) in SSMS has the right to backup/restore, sysadmin, db_backoperator, etc. The backup and restore processes runs under the SQL Server (Engine) Service account since you might be running SSMS on your laptop but working with files on the server. It doesn't matter who you ar...
How do I split large SQL database backup files in .net?
I am working on backing up and restoration of SQL Database. I am new to this.I have an issue related to Backup process. I have SQL database and I am using BACKUP and RESTORE classes to perform backup and restore of database. I want to make my program more efficient using split backup. I have aprx 15 to 20 GB of data. ...
1 If your original query works like you said it does (I don't know off the top of my head if it works that way or not) you just need to add the additional devices to the Backup object This should be the equivalent SMO code var server = new Server(/*...*/); var backup = new ...
How should I do back up of research in motion registration information (.zip) during code signing process of Blackberry?
I have already got PBDT.csj and RDK.csj files after code signing process with this (https://www.blackberry.com/SignedKeys/codesigning.html) link. But when I am trying to signing registration and configuration I need to do it with second option which is already marked in attached image, but there need to have research ...
Yes, There was option to take back up as a Research in motion after passing PBDT and RDK files while choosing first option in attached image. That I forgot to do it. Which is very important to take back up if you want to register your Blackberry devices again with same signing keys. Also refer this link http://suppor...
How to exclude .cpan folder from rsync?
I use rsync to backup the home directory (ext4) of my Ubuntu installation. I use the following command to copy files and folders to a remote server (ext4). $ rsync -rt --delete --delete-excluded --links \ --exclude-from '/home/jjd/rsync-home-exclude.txt' \ /home/jjd/ server:/volume1/backup-home I defined some fol...
Just remove /home/jjd from the exclude file. According to the rsync documentation, a leading slash does not apply to the root of the filesystem, but to the "root of the transfer".
Why do I get "ORA-00922: missing or invalid option" while exporting data from an Oracle schema?
I am running an export from Oracle 11g: $ expdp system/ELIDED JOB_NAME=exp_BTM2CATS SCHEMAS=BTM2CATS file=btm2cats-%u.dmp DIRECTORY=DP_DIR filesize=1900M CONSISTENT=Y DIRECT=Y Export: Release 11.2.0.1.0 - Production on Wed Jul 31 22:44:29 2013 Copyright (c) 1982, 2009, Oracle and/or its affiliates. All rights reser...
Change CONSISTENT=Y to flashback_time=systimestamp. Remove DIRECT=Y (you can think of expdp as always using direct path, whenever possible). Change FILE= parameter to DUMPFILE= parameter. So you wouldn't use legacy mode. See if this resolves ORA-922 issue.
Append Command From One Batch to another
I am trying to write a batch file that will write a new line with a "MOVE" command to a second batch file. We have a master batch file with a MOVE command for every PC that uses a piece of our software so we can back the records up to a network drive (scheduled to run daily). Data on the local PC's gets deleted afte...
ECHO "MOVE "\\%pcid%\C$\Program Files\Application\Data\*.xml" > "\\server32\c$\scripts\masterbackup.bat ---- ^ Remove this quote and add an extra waaaaay up at the very end...................................^.here The syntax is ECHO string > file Where quotes should be balanced and need to be placed around any (full-...
Backing up local SQL database onto the same computer using PHP
I'm using Wamp to, among other things, run a couple of local PHP sites that use local mySQL dbs in order to organize and keep personal info. None of this touches anything outside my PC. It just works on my local virtual server. However, if something happens to my PC, then everything's gone. If this were online, in an ...
In the end, after much looking into the issue and leaving it, letting it ripen in my mind, I was able to find exactly what I needed by using mysqldump: exec('mysqldump --user=XXX --password=XXX --host=localhost DBNAME > outputfile.sql'); Hope it might help someone else out there! P.S. Thanks a lot to @hellosheikh for...
Windows API BackupRead failing with error 50 on Windows Storage Server 2008 R2
We have a backup application that uses the Windows API BackupRead. It works correctly on Windows Server 2003, 2008, 2008 R2. It does not work on Storage Server 2008 R2. It always fails with error 50 - The request is not supported. The documentation for BackupRead gives no indication that it will not work with Storage ...
1 Known problem between Windows 2008 and non-2008 volumes. Hot fix resolves it. Share Improve this answer Follow answered Jun 28, 2013 at 0:51 Jason FJason F 3111 silver badge55 bronze ba...
Gathering Files from multiple computers into one
I am trying to gather files/folders from multiple computers in my network into one centralized folder in the command console (this is the name of the pseudo server for this set of computers) Basically, what i need is to collect a certain file from all the computers connected to my network and back it up in the console...
1 Just use the command copy must easy. take a look: for /F %%a in (computerslist.txt) do ( copy \\%%a\c$\users\administrator\desktop\%%a\*.txt c:\mycollecteddata\%%a ) that will copy all files *.txt for all computers that are on computereslist.txt; the copy will be with th...
Backup Computer Using Batch Script to external HDD
I am looking for a batch script that can detect last modified/accessed/created files in a day and can copy them to a specified location on external drive. Also if it can automatically execute just before shutdown that will also help a lot! Thank You !!
robocopy \path\to\source \path\to\dest /XO /E /Y or something like fastcopy.exe /cmd=diff /speed=full /force_start /no_confirm_del /auto_close "\path\to\source" /to="\path\to\dest"
how to start xampp in windows safe mode [closed]
Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 10 years ago. Improve this question ...
If MySQL can start : follow this post to connect to mysql in console mode : http://ja.meswilson.com/blog/2007/04/07/access-mysql-command-line-in-xampp/ And then backup it Edit : Other link : How can I access the MySQL command line with XAMPP for Windows?
Incremental backup db2 for i
Is there a way to do incremental backup on DB2 for i? I want to do something like this http://publib.boulder.ibm.com/infocenter/db2luw/v8/index.jsp?topic=/com.ibm.db2.udb.doc/admin/c0006069.htm
1 One method is simply to save your journal receivers. You can change receivers first, then save the detached recievers. Share Improve this answer Follow answered Jun 21, 2013 at 19:28 Wa...
'skip-backup' attribute always returns backup instead of skip process
i use this method for do not backup and that output is always success . but backup data also come in backup in ipad please help me. -(BOOL)addSkipBackupAttributeToItemAtURL:(NSURL *)URL { const char* filePath = [[URL path] fileSystemRepresentation]; const char* attrName = "com.apple.MobileBackup"; if (&NSURLIsExcluded...
I solve that problem .i found bug for NSUserdefault this NSUserdefault stored data store in preference in plist file so that NSUserdefault data remove and solve problem.
Compare NSFileModificationDate of previous Backup
Here am creating backup of my database. But i don want to jus keep creating backups. i need to check the NSModificationDate property of the most recently created backup database and have to create new backup only if the database is modified. Can anyone help me on this. -(IBAction)createdb:(id)sender { DatabaseList = [...
Instead of checking modification , you can use a simple trick as described by trojanfoe. When ever you are modifying i mean adding/ removing/ editing any record in database , set a BOOL flag = YES and store in NSUSERDEFAULTS , after creating the backup, set the flag to NO.
Doing Backup of database
i need to backup my database. Initially in my "Create Backup" page, i have my original database shown. When i click the add new backup button, a new backup of my database has to be created on checking a condition that whether any new changes have been made. If any changes have been made, new backup has to created. Oth...
Use this method. Create a new copy of your database and save with a different name. - (void)copyDatabaseToCache { NSArray *searchPaths = NSSearchPathForDirectoriesInDomains(NSCachesDirectory, NSUserDomainMask, YES); NSString *documentFolderPath = [searchPaths objectAtIndex: 0]; NSString *dbPath1 = [docume...
Error backup sql database but succeed creating database dump file
I tried this following code to backup mysql database into file and it works perfectly create the .sql file I need. function backup_tables() { $host='localhost'; $user='root'; $pass=''; $name='evote'; $tables = '*'; $link = mysql_connect($host,$user,$pass); mysql_select_db($name,$link); //get all of the tables if($t...
1 The first time you reach this line; $return.= 'DROP TABLE '.$table.';'; ...$return has no value to append to. To get rid of the warning, you'll need to initialize $return (to an empty string probably) before starting the loop. Share Improve this answer ...
Windows: Avoid or Disable Backups on Files
Protecting user files with File History talks about File History, which is basically a continuous backup for Windows 8. The blog discusses File History in depth, and also discusses how to integrate SkyDrive. I want to programmatically disable backup of certain files. The files live on another server, and there's no ne...
In Windows Phone 8, backup and restore settings are controlled by the user through system settings. An app cannot prevent itself from being backed up. However, note that the backup does not store any data associated with third party apps but rather only stores a list of installed apps So basically you don't need to do...
BackupDevice.PhysicalLocation does not add to specified location
Using C# and SMO, when I create backups they are being copied to the default backup location used by SQL Server (C:\Program Files\Microsoft SQL Server\MSSQL11.SQLEXPRESS\MSSQL\Backup), instead of the physical location that I specify in code: Database database = Server.Databases[dbName]); Backup backup = new Backup(...
try with below code static void BackupDataBase(string databaseName, string destinationPath) { try { Server myServer = GetServer(); Backup backup = new Backup(); backup.Action = BackupActionType.Database; backup.Database = databaseName; destinationPath = System.IO.Path.C...
Regular Backup Script for Apache Derby
Apache database hosted in a virtual server to be used with a JSF and JPA application.It there any method where regular back ups can be performed, for example once a day? Like an script?
Here's a lot of information about making backups of a Derby database: http://db.apache.org/derby/docs/10.9/adminguide/cadminhubbkup98797.html Choose a backup method that works well for you, then use your operating system's scheduling tools (cron, etc.) to arrange for that backup to be performed regularly.
rsync to backup one file generated in dynamic folders
I'm trying to backup just one file that is generated by other application in dynamic named folders. for example: parent_folder/ back_01 -> file_blabla.zip (timestam 2013.05.12) back_02 -> file_blabla01.zip (timestam 2013.05.14) back_03 -> file_blabla02.zip (timestam 2013.05.22) and I need to get the lates...
1 The file names will differ each time ? This would be hard for any type of syncing to work. What you could do is : create a new folder outside of where it is found, then : Before you start remove the last sym linked file in that folder When the file is found i.e. ls -tAF ...
How to protect folder containing a git history
I'm using git to keep track of writing projects and other personal work on my own PC (running a version of Ubuntu). Although my work is being version controlled, I am worried I might one day lose the whole folder (containing its .git file and the work itself) to mishap or technical failure. What is the best way to pro...
You can easily back up your work using Git itself. I might propose three ways to do that: Periodically back up your repository to a pen drive: Plug a flash drive to your PC; git init --bare a repository on it; Add it as a named remote in your main repository: git remote add --mirror=push pendrive /media/that_drive_i...
Bash backup specified file extensions in multiple directories
I have this line here find "$directory" -name "*.sh" -print0 | xargs -0 cp -t ~/bckup that backs up everything ending in .sh. How would I do that for multiple file extensions? I've tried different combinations of quotes, parentheses and $. None of them worked =\ I would also like to back up certain file extensions int...
One option might be to use the builtin logical or (from find man page): expr1 -o expr2 Or; expr2 is not evaluated if expr1 is true. So in your case you can do: find "$directory" -name '*.c' -o -name '*.sh'
Is it possible to backup records from a particular MySQL table a few at time with mysqldump? It's a table with a lot of records
So I have a table with nearly 200,000 records that I want to clean up. However I want to back it up. I've tried using the phpMyAdmin interface but the script keeps timing out given the huge size of the database. I've event tried backing up 5000 at a time and it doesn't work. I'm wondering if I'll have a better time do...
I figured how to do it and correct me if there's a better way but here's how I did it: I added a the --where= option and specified a condition where a column, say, user_id must be between 1 and 100 for example. mysqldump --opt -h somedomain.com -u dbuser -p dbpass db1 table1 --where="user_id >= 1 AND user_id <= 100" ...
Is it okay to cancel a T-SQL database backup script?
I needed to run a backup of a very large database (which has a scheduled transaction log backup) but it was running too long and i killed the process (which took a long time to rollback) -- between then and my next backup, will the cancellation cause any data loss? In case it doesn't seem clear, here's a rephrasing: I...
1 No cancellation of backup process will not affect next backup. Share Improve this answer Follow answered May 4, 2013 at 6:29 raviOcsraviOcs 1122 bronze badges Add a comment...
Backing up my schema and database objects using SQL Server 2008
I have a database that has a schema named lamb that has a number of database objects. I want to back up only the objects and data that are associated with the lamb schema and not the rest. Is this possible ??? If so how ???
1 It's Impossible unless you change their filegroup and create a filegroup for them, read this Backup Overview (SQL Server) for more details. Share Improve this answer Follow answered Apr 21, 201...